d539ddfafb8e62fafa536a35fe21691047402445,encoding/functions/encoding.py,_scaledL2,backward,#_scaledL2#Any#,97

Before Change


        X, C, S, SL = self.saved_tensors
        K = C.size(0)
        with torch.cuda.device_of(X):
            gradX = X.new().resize_as_(X)
            gradC = X.new().resize_as_(C)
            gradS = X.new().resize_as_(S)
        if isinstance(X, torch.cuda.FloatTensor):
            with torch.cuda.device_of(X):

After Change


        X, C, S, SL = self.saved_variables
        K = C.size(0)
        with torch.cuda.device_of(X.data):
            gradX = Variable(X.data.new().resize_as_(X.data))
            gradC = Variable(X.data.new().resize_as_(C.data))
            gradS = Variable(X.data.new().resize_as_(S.data))
        if isinstance(X.data, torch.cuda.FloatTensor):
            with torch.cuda.device_of(X.data):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 7

Instances


Project Name: zhanghang1989/PyTorch-Encoding
Commit Name: d539ddfafb8e62fafa536a35fe21691047402445
Time: 2017-11-16
Author: zhang.hang@rutgers.edu
File Name: encoding/functions/encoding.py
Class Name: _scaledL2
Method Name: backward


Project Name: zhanghang1989/PyTorch-Encoding
Commit Name: d539ddfafb8e62fafa536a35fe21691047402445
Time: 2017-11-16
Author: zhang.hang@rutgers.edu
File Name: encoding/functions/encoding.py
Class Name: _aggregate
Method Name: backward


Project Name: facebookresearch/ParlAI
Commit Name: d01eaf37af767cc859401d1f678307087f06c61a
Time: 2018-06-19
Author: kshuster@fb.com
File Name: parlai/agents/mlb_vqa/dropout.py
Class Name: SequentialDropout
Method Name: _make_noise