aef210dd525d1651fc5966033b91760fe1a126fc,src/garage/tf/models/base.py,Model,parameters,#Model#Any#,333
Before Change
variables = self._get_variables()
for name, var in variables.items():
if name in parameters:
var.load(parameters[name])
else:
warnings.warn("No value provided for variable {}".format(name))
@property
After Change
found = False
// param name without model name
param_name = name[name.find(self.name) + len(self.name) + 1:]
for k, v in parameters.items():
if param_name in k:
var.load(v)
found = True
continue
if not found:
warnings.warn("No value provided for variable {}".format(name))
@property
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances Project Name: rlworkgroup/garage
Commit Name: aef210dd525d1651fc5966033b91760fe1a126fc
Time: 2020-04-29
Author: ahtsans@gmail.com
File Name: src/garage/tf/models/base.py
Class Name: Model
Method Name: parameters
Project Name: OpenNMT/OpenNMT-py
Commit Name: a473c777983b7f2e123f996c9b15607cb1979701
Time: 2018-05-11
Author: stig-arne.gronroos@aalto.fi
File Name: onmt/ModelConstructor.py
Class Name:
Method Name: load_test_model
Project Name: facebookresearch/pytext
Commit Name: ec54a0b75d93cab5ad407920f2bbfd2f33251cc9
Time: 2019-01-18
Author: zsc@fb.com
File Name: pytext/trainers/trainer.py
Class Name: Trainer
Method Name: train