79ea4c6923dd064badd5da15cae012a7a7632268,PyPi/approximators/nn.py,DenseNN,_init,#DenseNN#,40

Before Change



    def _init(self):
        model = Sequential()
        model.add(Dense(self.hidden_neurons[0],
                        input_shape=(self.n_input,),
                        activation=self.activation,
                        init=self.init,

After Change


    def _init(self):
        pars = self.approximator_params
        n_input = pars.pop("n_input")
        hidden_neurons = pars.pop("hidden_neurons")
        n_output = pars.pop("n_output")
        loss = pars.pop("loss")
        optimizer = pars.pop("optimizer")

        model = Sequential()
        model.add(Dense(hidden_neurons[0], input_shape=(n_input,), **pars))
        for i in range(1, len(hidden_neurons)):
            model.add(Dense(hidden_neurons[i], **pars))
        model.add(Dense(n_output, activation="linear", **pars))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: AIRLab-POLIMI/mushroom
Commit Name: 79ea4c6923dd064badd5da15cae012a7a7632268
Time: 2017-03-16
Author: carlo.deramo@gmail.com
File Name: PyPi/approximators/nn.py
Class Name: DenseNN
Method Name: _init


Project Name: keras-team/autokeras
Commit Name: 6cb84f4b742861e823015cac18535efa468b0d81
Time: 2017-12-15
Author: jhfjhfj1@gmail.com
File Name: autokeras/layer_transformer.py
Class Name:
Method Name: dense_to_wider_layer