6ddf825a4aa1bcf3a35bba8d36bc433fe5ebaa39,torchsample/utils.py,,th_nearest_interp_3d,#Any#Any#,285

Before Change


                          zc.round().long()], 2)

    // 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


    // take clamp of coords so they"re in the image bounds
    coords[:,0] = torch.clamp(coords[:,0], 0, input.size(1)-1).round()
    coords[:,1] = torch.clamp(coords[:,1], 0, input.size(2)-1).round()
    coords[:,2] = torch.clamp(coords[:,2], 0, input.size(3)-1).round()

    stride = torch.LongTensor(input.stride())[1:].float()
    idx = coords.mv(stride)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 5

Non-data size: 5

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: NeuromorphicProcessorProject/snn_toolbox
Commit Name: 2cd4ca6dc541b568f4d508542fa2cc79a58e5e68
Time: 2020-06-03
Author: bodo.rueckauer@gmail.com
File Name: snntoolbox/simulation/backends/inisim/temporal_pattern.py
Class Name:
Method Name: to_binary_numpy


Project Name: DT42/BerryNet
Commit Name: 1a4afd3eb200e41706b67497bdc94261263147ee
Time: 2018-02-19
Author: bofu@dt42.io
File Name: berrynet/engine/movidius.py
Class Name:
Method Name: process_inceptionv3_output


Project Name: Microsoft/nni
Commit Name: afb4e78c5c9c4782482777fd8587c636711ab2e5
Time: 2019-08-04
Author: suiguoxin@gmail.com
File Name: src/sdk/pynni/nni/gridsearch_tuner/gridsearch_tuner.py
Class Name: GridSearchTuner
Method Name: _parse_quniform


Project Name: NifTK/NiftyNet
Commit Name: a59350bf9cc20c9e02e2397d31bbf87848db8f9e
Time: 2017-10-19
Author: carole.sudre.12@ucl.ac.uk
File Name: niftynet/evaluation/region_properties.py
Class Name: RegionProperties
Method Name: glcm