5efaf25f5499c7065f1c37bfd4288159714406d8,src/syft/lib/torch/uppercase_tensor.py,,,#,11

Before Change


import torch as th

// Torch dtypes to string (and back) mappers
TORCH_DTYPE_STR = {
    th.uint8: "uint8",
    th.int8: "int8",
    th.int16: "int16",
    th.int32: "int32",
    th.int64: "int64",
    th.float16: "float16",
    th.float32: "float32",
    th.float64: "float64",
    th.complex32: "complex32",
    th.complex64: "complex64",
    th.complex128: "complex128",
    th.bool: "bool",
    th.qint8: "qint8",
    th.quint8: "quint8",
    th.qint32: "qint32",
    th.bfloat16: "bfloat16",
}
TORCH_STR_DTYPE = {name: cls for cls, name in TORCH_DTYPE_STR.items()}


class UppercaseTensorConstructor(ObjectConstructor):

After Change


// Step 3: create constructor and install it in the library
UppercaseTensorConstructor().install_inside_library()

torch_tensor_type = type(th.tensor([1, 2, 3]))


class TorchTensorWrapper(StorableObject):
    def __init__(self, value):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 2

Instances


Project Name: OpenMined/PySyft
Commit Name: 5efaf25f5499c7065f1c37bfd4288159714406d8
Time: 2020-08-12
Author: vova@promail.spb.ru
File Name: src/syft/lib/torch/uppercase_tensor.py
Class Name:
Method Name:


Project Name: NervanaSystems/coach
Commit Name: 85afb86893ad241660b3ff7dc23fe5eb581a83ce
Time: 2018-02-21
Author: zach.dwiel@intel.com
File Name: agents/agent.py
Class Name: Agent
Method Name: act


Project Name: keras-team/keras
Commit Name: 4d7ff76cfbaf5fb8a57d8f3232c989e8e2c2f5b5
Time: 2016-04-01
Author: francois.chollet@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: KerasClassifier
Method Name: score


Project Name: keras-team/keras
Commit Name: 4d7ff76cfbaf5fb8a57d8f3232c989e8e2c2f5b5
Time: 2016-04-01
Author: francois.chollet@gmail.com
File Name: keras/wrappers/scikit_learn.py
Class Name: KerasRegressor
Method Name: score