8ef790ad39c9d8beb926bea66bd3f37b74dd15df,art/estimators/classification/keras.py,KerasClassifier,get_activations,#KerasClassifier#Any#Any#Any#Any#,461

Before Change


            layer_output = self._model.get_layer(layer_name).output

        if intermediate:
            return layer_output

        output_func = k.function([self._input], [layer_output])

        if x.shape == self.input_shape:

After Change


        else:
            layer_output = self._model.get_layer(layer_name).output

        if intermediate:
            placeholder = k.placeholder(shape=x.shape)
            return placeholder, self._model.get_layer(layer_name)(placeholder)

        output_func = k.function([self._input], [layer_output])

        if x.shape == self.input_shape:
            x_expanded = np.expand_dims(x, 0)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 8ef790ad39c9d8beb926bea66bd3f37b74dd15df
Time: 2020-05-20
Author: ebube.chuba@ibm.com
File Name: art/estimators/classification/keras.py
Class Name: KerasClassifier
Method Name: get_activations


Project Name: tensorflow/cleverhans
Commit Name: 6667fb34f81f5c523c97952f1ea5fe0ba6d769bd
Time: 2017-06-21
Author: papernot@google.com
File Name: cleverhans/model.py
Class Name: KerasModelWrapper
Method Name: fprop


Project Name: tensorflow/cleverhans
Commit Name: 6f17d8d1e5972fe0a16e7ce91c827080ad1a42de
Time: 2018-03-20
Author: nishant@unify.id
File Name: cleverhans/utils_keras.py
Class Name: KerasModelWrapper
Method Name: get_logits