Skip to content

Commit 278b005

Browse files
Muhammad Zaid HameedMuhammad Zaid Hameed
Muhammad Zaid Hameed
authored and
Muhammad Zaid Hameed
committed
style checks more mypy corrections
Signed-off-by: Muhammad Zaid Hameed <Zaid.Hameed@ibm.com>
1 parent bc6588d commit 278b005

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

art/defences/trainer/adversarial_trainer_awp_pytorch.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -416,9 +416,9 @@ def _weight_perturbation(
416416
"Incorrect mode provided for base adversarial training. 'mode' must be among 'PGD' and 'TRADES'."
417417
)
418418

419-
self._proxy_classifier._optimizer.zero_grad() # pylint: disable=W0212 # type: ignore
419+
self._proxy_classifier._optimizer.zero_grad() # type: ignore # pylint: disable=W0212
420420
loss.backward()
421-
self._proxy_classifier._optimizer.step() # pylint: disable=W0212 # type: ignore
421+
self._proxy_classifier._optimizer.step() # type: ignore # pylint: disable=W0212
422422

423423
params_dict_proxy, _ = self._calculate_model_params(self._proxy_classifier)
424424

0 commit comments

Comments
 (0)