Skip to content

Commit 4db7626

Browse files
committed
remove huggingface estimator activation hack
Signed-off-by: Farhan Ahmed <Farhan.Ahmed@ibm.com>
1 parent 123af2c commit 4db7626

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

art/estimators/classification/hugging_face.py

+1-5
Original file line numberDiff line numberDiff line change
@@ -318,11 +318,7 @@ def get_activations( # type: ignore
318318
def get_feature(name):
319319
# the hook signature
320320
def hook(model, input, output): # pylint: disable=W0622,W0613
321-
# TODO: this is using the input, rather than the output, to circumvent the fact
322-
# TODO: that flatten is not a layer in pytorch, and the activation defence expects
323-
# TODO: a flattened input. A better option is to refactor the activation defence
324-
# TODO: to not crash if non 2D inputs are provided.
325-
self._features[name] = input
321+
self._features[name] = output
326322

327323
return hook
328324

0 commit comments

Comments
 (0)