8e9a026bc34d8409faa572a7144c2d96a7c039ed,tests/models/test_restore.py,,test_model_saving_loading,#Any#,411
Before Change
if not isinstance(dataloaders, list):
dataloaders = [dataloaders]
for dataloader in dataloaders:
for batch in dataloader:
break
x, y = batch
x = x.view(x.size(0), -1)
// generate preds before saving model
After Change
if not isinstance(dataloaders, list):
dataloaders = [dataloaders]
batch = next(iter(dataloaders[0]))
// generate preds before saving model
model.eval()
pred_before_saving = model(batch)
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 6
Instances Project Name: williamFalcon/pytorch-lightning
Commit Name: 8e9a026bc34d8409faa572a7144c2d96a7c039ed
Time: 2021-02-11
Author: rohitgr1998@gmail.com
File Name: tests/models/test_restore.py
Class Name:
Method Name: test_model_saving_loading
Project Name: uber/ludwig
Commit Name: a1a6b7db4b2f751b6f6be9adfb452b200c9a3ee7
Time: 2020-09-20
Author: jimthompson5802@gmail.com
File Name: ludwig/features/image_feature.py
Class Name: ImageFeatureMixin
Method Name: add_feature_data
Project Name: calico/basenji
Commit Name: 25da570d5c5baa71d55dc9623e3a8bb20f878f86
Time: 2019-11-11
Author: drk@calicolabs.com
File Name: basenji/trainer.py
Class Name: Trainer
Method Name: fit_tape