f4ca9b361adb382423c753f7f864a5dd0e454964,torchsample/transforms/tensor_transforms.py,TypeCast,__call__,#TypeCast#,171

Before Change


        self.dtype = dtype

    def __call__(self, x, y=None):
        x = x.type(self.dtype)
        if y is not None:
            y = y.type(self.dtype)
            return x, y
        return x

After Change


        self.dtype = dtype

    def __call__(self, *inputs):
        outputs = []
        for idx, _input in enumerate(inputs):
            _input = _input.type(self.dtype)
            outputs.append(_input)
        return outputs if idx > 1 else outputs[0]
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: ncullen93/torchsample
Commit Name: f4ca9b361adb382423c753f7f864a5dd0e454964
Time: 2017-05-12
Author: ncullen.th@dartmouth.edu
File Name: torchsample/transforms/tensor_transforms.py
Class Name: TypeCast
Method Name: __call__


Project Name: nicola-decao/s-vae-pytorch
Commit Name: 4537298ec78fbf30cd4fe914e9668cd3445373b2
Time: 2018-07-28
Author: nicola.decao@student.uva.nl
File Name: hyperspherical_vae/distributions/von_mises_fisher.py
Class Name: VonMisesFisher
Method Name: __sample_w_rej


Project Name: mariogeiger/se3cnn
Commit Name: 9c309a959052ec40cf92cf4baa3894f5118cf8c4
Time: 2019-07-08
Author: geiger.mario@gmail.com
File Name: se3cnn/blocks/point_gated_block.py
Class Name: PointGatedBlock
Method Name: __init__