5d584c27f062e9557aa920af6758b995f4094ed9,python/caffe/pycaffe.py,,_Net_forward_backward_all,#Any#Any#Any#,150
Before Change
for out in all_outs:
del all_outs[out][-pad:]
for diff in all_diffs:
del all_diffs[diff][-pad:]
return all_outs, all_diffs
def _Net_set_mean(self, input_, mean_f, mode="image"):
After Change
for diff, out_diffs in batch_diffs.iteritems():
all_diffs[diff].extend(out_diffs)
// Package in ndarray.
for out, diff in zip(all_outs, all_diffs):
all_outs[out] = np.asarray(all_outs[out])
all_diffs[diff] = np.asarray(all_diffs[diff])
// Discard padding at the end and package in ndarray.
pad = len(all_outs.itervalues().next()) - len(kwargs.itervalues().next())
if pad:
for out, diff in zip(all_outs, all_diffs):
all_outs[out] = all_outs[out][:-pad]
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 5
Instances Project Name: BVLC/caffe
Commit Name: 5d584c27f062e9557aa920af6758b995f4094ed9
Time: 2014-05-16
Author: shelhamer@imaginarynumber.net
File Name: python/caffe/pycaffe.py
Class Name:
Method Name: _Net_forward_backward_all
Project Name: OpenNMT/OpenNMT-py
Commit Name: d314a48ed4a95926aece62f554cecb4544b5acd5
Time: 2019-11-12
Author: pltrdy@gmail.com
File Name: onmt/models/model_saver.py
Class Name: ModelSaverBase
Method Name: save
Project Name: OpenNMT/OpenNMT-py
Commit Name: d314a48ed4a95926aece62f554cecb4544b5acd5
Time: 2019-11-12
Author: pltrdy@gmail.com
File Name: onmt/trainer.py
Class Name: Trainer
Method Name: validate