d317e22332d549184116872b5f6ea8066c66fa2f,deepmedic/neuralnet/layers.py,SoftmaxLayer,makeLayer,#SoftmaxLayer#Any#Any#Any#,421

Before Change


        logits_train,
        logits_val,
        logits_test) = makeBiasParamsAndApplyToFms(self.input["train"], self.input["val"], self.input["test"])
        self._params = self._params + [self._b]
        
        // ============ Softmax ==============
        self.p_y_given_x_train = tf.nn.softmax(logits_train/t, axis=1)
        self.y_pred_train = tf.argmax(self.p_y_given_x_train, axis=1)

After Change


        // NOTE: So, two biases are associated with this layer. self.b which is added in the ouput of the previous layer"s output of conv,
        // and this self._bClassLayer that is added only to this final output before the softmax.
        
        bias_layer = BiasLayer(self.input["train"].shape[1])
        logits_train = bias_layer.apply(self.input["train"])
        logits_val = bias_layer.apply(self.input["val"])
        logits_test = bias_layer.apply(self.input["test"])
        self._params = self._params + bias_layer.trainable_params()
        
        
        // ============ Softmax ==============
        self.p_y_given_x_train = tf.nn.softmax(logits_train/t, axis=1)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 16

Instances


Project Name: Kamnitsask/deepmedic
Commit Name: d317e22332d549184116872b5f6ea8066c66fa2f
Time: 2020-01-07
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/neuralnet/layers.py
Class Name: SoftmaxLayer
Method Name: makeLayer


Project Name: Kamnitsask/deepmedic
Commit Name: d317e22332d549184116872b5f6ea8066c66fa2f
Time: 2020-01-07
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/neuralnet/layers.py
Class Name: SoftmaxLayer
Method Name: makeLayer


Project Name: Kamnitsask/deepmedic
Commit Name: c86f490ec902331f9e64824f1fc9395c5b3f2cad
Time: 2020-01-07
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/neuralnet/layers.py
Class Name: ConvLayer
Method Name: _processInputWithBnNonLinearityDropoutPooling


Project Name: Kamnitsask/deepmedic
Commit Name: d317e22332d549184116872b5f6ea8066c66fa2f
Time: 2020-01-07
Author: konstantinos.kamnitsas12@imperial.ac.uk
File Name: deepmedic/neuralnet/layers.py
Class Name: ConvLayer
Method Name: _processInputWithBnNonLinearityDropoutPooling