5a3f444696ba821ce35e165747cd03c6e03b6c5a,art/estimators/embedding/keras.py,KerasAdversarialEmbedding,__init__,#KerasAdversarialEmbedding#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,54
Before Change
detect_threshold=detect_threshold,
)
// create discriminator and append to output
feature_layer_keras = self.model.get_layer(feature_layer)
dense_layer_1 = Dense(self.discriminator_layer_1)(feature_layer_keras)
norm_1_layer = BatchNormalization()(dense_layer_1)
leaky_layer_1 = LeakyReLU()(norm_1_layer)
dense_layer_2 = Dense(self.discriminator_layer_2)(leaky_layer_1)
After Change
if not model.losses:
// Assuming output layer is last layer
output_layer = len(model.layers) - 1
losses = {model .layers[output_layer].name: model.loss, "backdoor_detect": "binary_crossentropy"}
else:
// TODO: this makes no sense
losses = {"output_" + str(i + 1): loss for i, loss in model.outputs}
In pattern: SUPERPATTERN
Frequency: 4
Non-data size: 3
Instances Project Name: IBM/adversarial-robustness-toolbox
Commit Name: 5a3f444696ba821ce35e165747cd03c6e03b6c5a
Time: 2020-08-07
Author: ebube.chuba@ibm.com
File Name: art/estimators/embedding/keras.py
Class Name: KerasAdversarialEmbedding
Method Name: __init__
Project Name: rwth-i6/returnn
Commit Name: ea35a10efad0b27594f97bea2bf732a4910fa7d8
Time: 2021-03-24
Author: albzey@gmail.com
File Name: returnn/tf/network.py
Class Name: TFNetwork
Method Name: get_layer
Project Name: adalca/neuron
Commit Name: 60027b1801ee16340f00183b3f3c46468117c8f1
Time: 2017-04-21
Author: adalca@turmeric.csail.mit.edu
File Name: neuron/models.py
Class Name:
Method Name: copy_weights
Project Name: fizyr/keras-retinanet
Commit Name: 7decd7e360d4b7db142c83ff863eb3c534e122b6
Time: 2018-03-07
Author: cgratie@gmail.com
File Name: keras_retinanet/models/resnet.py
Class Name:
Method Name: resnet_retinanet