6ddf825a4aa1bcf3a35bba8d36bc433fe5ebaa39,torchsample/utils.py,,th_nearest_interp_3d,#Any#Any#,285
Before Change
// gather image values at coordinates
mapped_vals = torch.stack([th_gather_nd(input[i], coords[i])
for i in range(input.size(0) )], 0)
return mapped_vals.view_as(input)
After Change
input_flat = th_flatten(input)
mapped_vals = input_flat[idx.long() ]
return mapped_vals.view_as(input)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances Project Name: ncullen93/torchsample
Commit Name: 6ddf825a4aa1bcf3a35bba8d36bc433fe5ebaa39
Time: 2017-04-24
Author: ncullen@Nicks-MacBook-Pro.local
File Name: torchsample/utils.py
Class Name:
Method Name: th_nearest_interp_3d
Project Name: pytorch/fairseq
Commit Name: 4fed0beca64a52aa718371dc3b2cf1fd979197a4
Time: 2021-02-10
Author: patrick.v.platen@gmail.com
File Name: fairseq/models/wav2vec/wav2vec2.py
Class Name: Wav2Vec2Model
Method Name: forward
Project Name: rusty1s/pytorch_geometric
Commit Name: 430beec651fe14e4f0f032cbc27e18a9ca415d90
Time: 2018-03-06
Author: matthias.fey@tu-dortmund.de
File Name: examples/cora.py
Class Name:
Method Name: