Skip to content

Commit 7ec4b2a

Browse files
committed
using data shape instead of model.
Signed-off-by: Taesung Lee <[email protected]>
1 parent 438cb5c commit 7ec4b2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

art/attacks/poisoning/gradient_matching_attack.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ def _weight_grad(classifier: TensorFlowV2Classifier, x: tf.Tensor, target: tf.Te
190190
y_true_poison = Input(shape=np.shape(y_poison)[1:])
191191
embedding_layer = Embedding(
192192
len(x_poison),
193-
np.prod(input_poison.shape[1:]),
193+
np.prod(x_poison.shape[1:]),
194194
embeddings_initializer=tf.keras.initializers.RandomNormal(stddev=self.epsilon * 0.01),
195195
)
196196
embeddings = embedding_layer(input_indices)

0 commit comments

Comments
 (0)