ef2be6e6d06e153141acdbd44e54405fe1dc2c4a,torchsample/modules/module_trainer.py,ModuleTrainer,set_constraints,#ModuleTrainer#Any#,147

Before Change


        self._has_regularizers = True

    def set_constraints(self, constraints):
        if not isinstance(constraints, (list,tuple)):
            constraints = [constraints]
        self._constraints = constraints
        self._has_constraints = True
        if any([c.lagrangian for c in self._constraints]):
            self._has_lagrangian_constraints = True

After Change


        self._initializers = initializers

    def set_constraints(self, constraints):
        constraints = [constraints] if not _is_tuple_or_list(constraints) else constraints
        self._has_constraints = True
        self._constraints = constraints

    def set_metrics(self, metrics):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 11

Instances


Project Name: ncullen93/torchsample
Commit Name: ef2be6e6d06e153141acdbd44e54405fe1dc2c4a
Time: 2017-07-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: set_constraints


Project Name: ncullen93/torchsample
Commit Name: ef2be6e6d06e153141acdbd44e54405fe1dc2c4a
Time: 2017-07-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: set_regularizers


Project Name: ncullen93/torchsample
Commit Name: ef2be6e6d06e153141acdbd44e54405fe1dc2c4a
Time: 2017-07-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: set_metrics


Project Name: ncullen93/torchsample
Commit Name: ef2be6e6d06e153141acdbd44e54405fe1dc2c4a
Time: 2017-07-13
Author: ncullen.th@dartmouth.edu
File Name: torchsample/modules/module_trainer.py
Class Name: ModuleTrainer
Method Name: set_initializers