bc4dfbcc2ecae4b3a4bedc2bd18909a9208c05cb,train.py,,,#,21
Before 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:
After Change
// Initiate model
model = Darknet(opt.model_config_path)
model.apply(weights_init_normal)
if cuda:
model = model.cuda()
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 3
Instances
Project Name: eriklindernoren/PyTorch-YOLOv3
Commit Name: bc4dfbcc2ecae4b3a4bedc2bd18909a9208c05cb
Time: 2018-06-01
Author: eriklindernoren@gmail.com
File Name: train.py
Class Name:
Method Name:
Project Name: mne-tools/mne-python
Commit Name: c2d9a3fab4de5cc9974cc4bc23ec84c0a3e5bfca
Time: 2020-10-14
Author: larson.eric.d@gmail.com
File Name: mne/preprocessing/tests/test_ica.py
Class Name:
Method Name: test_ica_core
Project Name: QUANTAXIS/QUANTAXIS
Commit Name: 20531f89eef9ee5e5248203351fe98241825397e
Time: 2019-10-04
Author: yutiansut@qq.com
File Name: QUANTAXIS/QAFetch/QATdx.py
Class Name:
Method Name: QA_fetch_get_bond_min