42418e10a68f534b939a125a9ccd60167f9a6633,torchsample/transforms/torch_transforms.py,AddChannel,__call__,#AddChannel#Any#Any#,141
Before Change
def __call__(self, x, y=None):
x = torch.from_numpy(x.numpy().reshape(1,x.size(0), x.size(1)))
if y is not None:
y = torch.from_numpy(y.numpy().reshape(1,y.size(0), y.size(1)))
return x, y
else:
return x
After Change
of size (1, 28, 28), for example.
def __call__(self, x, y=None):
x = x.unsqueeze(2)
if y is not None:
y = y.unsqueeze(2)
return x,y
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: ncullen93/torchsample
Commit Name: 42418e10a68f534b939a125a9ccd60167f9a6633
Time: 2017-04-18
Author: ncullen@modv-vlan533.0292.apn.wlan.wireless-pennnet.upenn.edu
File Name: torchsample/transforms/torch_transforms.py
Class Name: AddChannel
Method Name: __call__
Project Name: lanpa/tensorboardX
Commit Name: 38e284c453bcdad445b300c832ec543f5a0e691e
Time: 2017-06-23
Author: huang.dexter@gmail.com
File Name: tensorboard/summary.py
Class Name:
Method Name: image
Project Name: rlworkgroup/garage
Commit Name: f056fb8f6226c83d340c869e0d5312d61acf07f0
Time: 2021-03-23
Author: 41180126+krzentner@users.noreply.github.com
File Name: src/garage/torch/q_functions/discrete_dueling_cnn_q_function.py
Class Name: DiscreteDuelingCNNQFunction
Method Name: forward