Browse Source

update examples/face_adversarial_attack/example/loss_design.py.

Signed-off-by: 君君臣臣君 <mingjun@isrc.iscas.ac.cn>
pull/416/head
君君臣臣君 Gitee 3 years ago
parent
commit
f7d715241c
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      examples/face_adversarial_attack/example/loss_design.py

+ 1
- 1
examples/face_adversarial_attack/example/loss_design.py View File

@@ -34,7 +34,7 @@ class MyTrainOneStepCell(nn.TrainOneStepCell):
"""

def __init__(self, network, optimizer, sens=1.0):
super(MyTrainOneStepCell, self).__init__(network, optimizer,sens)
super(MyTrainOneStepCell, self).__init__(network, optimizer, sens)
self.grad = ops.composite.GradOperation(get_all=True, sens_param=False)

def construct(self, *inputs):


Loading…
Cancel
Save