c5e14f381505fddf2b7b1595da924aabaa21557d,theanolm/src/theanolm/trainers/modeltrainer.py,ModelTrainer,set_state,#ModelTrainer#Any#,114

Before Change


            if not name in state:
                raise IncompatibleStateError("Parameter %s is missing from "
                                             "training state." % name)
            param.set_value(state[name])

        if not "cost_history" in state:
            raise IncompatibleStateError("Validation set cost history is "
                                         "missing from training state.")

After Change


                                             "training state." % name)
            new_value = state[name]
            param.set_value(new_value)
            if len(new_value.shape) == 0:
                logging.debug("name <- %s", str(new_value))
            else:
                logging.debug("name <- array%s", str(new_value.shape))

        if not "cost_history" in state:
            raise IncompatibleStateError("Validation set cost history is "
                                         "missing from training state.")
        saved_cost_history = state["cost_history"].tolist()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: senarvi/theanolm
Commit Name: c5e14f381505fddf2b7b1595da924aabaa21557d
Time: 2015-10-07
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/trainers/modeltrainer.py
Class Name: ModelTrainer
Method Name: set_state


Project Name: senarvi/theanolm
Commit Name: c5e14f381505fddf2b7b1595da924aabaa21557d
Time: 2015-10-07
Author: seppo.git@marjaniemi.com
File Name: theanolm/src/theanolm/network.py
Class Name: Network
Method Name: set_state


Project Name: home-assistant/home-assistant
Commit Name: d6a47cb3e058ca3c10eecc048347ef4e51ae4ebe
Time: 2020-04-15
Author: nick@koston.org
File Name: homeassistant/components/homekit/type_sensors.py
Class Name: AirQualitySensor
Method Name: update_state