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):
In pattern: SUPERPATTERN
Frequency: 5
Non-data size: 5
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: pantsbuild/pants
Commit Name: edd039bf98702f3eb01a7cd4e25559247e686a72
Time: 2017-06-16
Author: stuhood@twitter.com
File Name: src/python/pants/engine/legacy/graph.py
Class Name: LegacyBuildGraph
Method Name: _inject
Project Name: pgmpy/pgmpy
Commit Name: 005cd59c9327b7376cd5140ea5f0435620964669
Time: 2015-11-17
Author: ankurankan@gmail.com
File Name: pgmpy/inference/Sampling.py
Class Name: BayesianModelSampling
Method Name: __init__
Project Name: senarvi/theanolm
Commit Name: 2c12d5f7ead1e7fc04d3cfd0efec6830208611e3
Time: 2015-10-05
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/sgdtrainer.py
Class Name: SGDTrainer
Method Name: __init__
Project Name: horovod/horovod
Commit Name: ea692ade194392250df2e4681764090868bdca82
Time: 2021-02-04
Author: irasit@users.noreply.github.com
File Name: horovod/spark/torch/estimator.py
Class Name: TorchModel
Method Name: _transform