114c62efce4478ea816dd1429f6f0ce7da89c4d1,pointnet2/utils/pointnet2_modules.py,,,#,200

Before Change


    from torch.autograd import Variable
    torch.manual_seed(1)
    torch.cuda.manual_seed_all(1)
    xyz = Variable(torch.randn(2, 9, 3).cuda(), requires_grad=True)
    xyz_feats = Variable(torch.randn(2, 9, 6).cuda(), requires_grad=True)

    test_module = PointnetSAModuleMSG(
        npoint=2, radii=[5.0, 10.0], nsamples=[6, 3], mlps=[[9, 3], [9, 6]])
    test_module.cuda()
    print(test_module(xyz, xyz_feats))

    //  test_module = PointnetFPModule(mlp=[6, 6])
    //  test_module.cuda()
    //  from torch.autograd import gradcheck
    //  inputs = (xyz, xyz, None, xyz_feats)
    //  test = gradcheck(test_module, inputs, eps=1e-6, atol=1e-4)
    //  print(test)

    for _ in range(1):
        _, new_features = test_module(xyz, xyz_feats)
        new_features.backward(
            torch.cuda.FloatTensor(*new_features.size()).fill_(1))
        print(new_features)

After Change


from pointnet2.utils import pointnet2_utils


if False:
    // Workaround for type hints without depending on the `typing` module
    from typing import *


class _PointnetSAModuleBase(nn.Module):

    def __init__(self):
        super(_PointnetSAModuleBase, self).__init__()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: erikwijmans/Pointnet2_PyTorch
Commit Name: 114c62efce4478ea816dd1429f6f0ce7da89c4d1
Time: 2019-01-16
Author: amp180@gmail.com
File Name: pointnet2/utils/pointnet2_modules.py
Class Name:
Method Name:


Project Name: osmr/imgclsmob
Commit Name: bf0c7bd1636f34eb6ed322e4194f987daa3336f1
Time: 2020-03-30
Author: osemery@gmail.com
File Name: pytorch/pytorchcv/models/others/oth_naivenet.py
Class Name:
Method Name:


Project Name: cornellius-gp/gpytorch
Commit Name: 91b0d220c8e816766fd4565e1d2f5115d3afbefe
Time: 2018-10-12
Author: gpleiss@gmail.com
File Name: test/functions/test_inv_quad_log_det.py
Class Name: TestInvQuadLogDetBatch
Method Name: setUp