803d7e1fc61536c846c811bdee158bd21db36779,models/Pointnet2Cls.py,,,#,92
Before Change
if __name__ == "__main__":
from torch.autograd import Variable
model = PointnetCls()
data = Variable(torch.randn(2, 10, 3))
print(model(data))
After Change
model_fn = model_fn_decorator(nn.CrossEntropyLoss())
for _ in range(20):
optimizer.zero_grad()
_, loss, _ = model_fn(model, (inputs, labels))
loss.backward()
print(loss.data[0])
optimizer.step()
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 5
Instances
Project Name: erikwijmans/Pointnet2_PyTorch
Commit Name: 803d7e1fc61536c846c811bdee158bd21db36779
Time: 2017-12-26
Author: ewijmans2@gmail.com
File Name: models/Pointnet2Cls.py
Class Name:
Method Name:
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 9dfafadcea9f709132bce12341a32ff5e27ec33a
Time: 2018-04-24
Author: eriklindernoren@gmail.com
File Name: implementations/infogan/infogan.py
Class Name:
Method Name: sample_image
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: fc9e5824ad7bd3094f5012dc6fc3d2348481a2f4
Time: 2019-04-02
Author: eriklindernoren@live.se
File Name: implementations/bicyclegan/bicyclegan.py
Class Name:
Method Name: sample_images
Project Name: eriklindernoren/PyTorch-GAN
Commit Name: 9e3ac57d2a0480ded339841dda18b13e2645987f
Time: 2018-05-12
Author: eriklindernoren@gmail.com
File Name: implementations/bicyclegan/bicyclegan.py
Class Name:
Method Name: sample_images