7fffa98b9166a03b4a53fb40202d97b09e8e9036,train.py,,,#,21
Before Change
targets = Variable(targets.type(Tensor), requires_grad=False)
optimizer.zero_grad()
loss = model(imgs, targets)
loss.backward()
optimizer.step()
After Change
targets = Variable(targets.type(Tensor), requires_grad=False)
loss = 0
for i in range(subdivisions):
optimizer.zero_grad()
sub_imgs = imgs[i*sub_batch: (i+1)*sub_batch]
sub_targets = targets[i*sub_batch: (i+1)*sub_batch]
loss += model(sub_imgs, sub_targets)
loss.backward()
optimizer.step()
if epoch % opt.checkpoint_interval == 0:

In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: 7fffa98b9166a03b4a53fb40202d97b09e8e9036
Time: 2018-05-29
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name:
Project Name: fperazzi/proSR
Commit Name: 13287043443135f6f3f8ed787d3978866c390d81
Time: 2019-03-27
Author: fperazzi@adobe.com
File Name: test.py
Class Name:
Method Name:
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: