DSE-MSU / DeepRobust

A pytorch adversarial library for attack and defense methods on images and graphs
MIT License
995 stars 192 forks source link

PGD loss prox_nuclear increase after several epochs and then the loss increase always #53

Closed zhangxiaowei5346 closed 3 years ago

zhangxiaowei5346 commented 3 years ago

Hello, I have changed the code "Pro-GNN“ to my own dataset and I found the loss prox_nuclear increase after several epochs, how can I fix it?

ChandlerBang commented 3 years ago

Hi, I think you can try increase the weight of the low rank loss, i.e. $\beta$ or lower the value of other loss weights. But I feel it weird since the $\beta$ in the original Pro-GNN setting is already pretty large....

You can first try what I suggested. If you still have problems, you can come back here.

zhangxiaowei5346 commented 3 years ago

Hi, I think you can try increase the weight of the low rank loss, i.e. $\beta$ or lower the value of other loss weights. But I feel it weird since the $\beta$ in the original Pro-GNN setting is already pretty large....

You can first try what I suggested. If you still have problems, you can come back here.

Thanks for your reply and I will try your suggestion!

qianxiao111 commented 3 years ago

Hi, I think you can try increase the weight of the low rank loss, i.e. $\beta$ or lower the value of other loss weights. But I feel it weird since the $\beta$ in the original Pro-GNN setting is already pretty large.... You can first try what I suggested. If you still have problems, you can come back here.

Thanks for your reply and I will try your suggestion!

Hi, when

Hi, I think you can try increase the weight of the low rank loss, i.e. $\beta$ or lower the value of other loss weights. But I feel it weird since the $\beta$ in the original Pro-GNN setting is already pretty large.... You can first try what I suggested. If you still have problems, you can come back here.

Thanks for your reply and I will try your suggestion!

Hello, when I test examples by using "python examples/image/test_PGD.py", the error is that Load network Traceback (most recent call last): File "examples/image/test_PGD.py", line 19, in import ipdb ModuleNotFoundError: No module named 'ipdb' I installed ipdb, but it has the same error. Could you give me some suggestion?

ChandlerBang commented 3 years ago

Hi,

I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

qianxiao111 commented 3 years ago

Hi,

I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Thank you very much!

qianxiao111 commented 3 years ago

Hi,

I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Hi, Could you give me some suggestion? When I test examples by using "python examples/image/test_lbfgs.py", the error is that File "examples/image/test_lbfgs.py", line 28, in AdvExArray, dis, loss, valueofc= attack.generate(xx, yy, **attack_params['LBFGS_MNIST']) TypeError: generate() missing 1 required positional argument: 'target_label'

YaxinLi0-0 commented 3 years ago

Hi, I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Thank you very much!

Yes, you can simply remove the two lines. I'll also remove them from the example. Thanks!

qianxiao111 commented 3 years ago

Hi, I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Thank you very much!

Yes, you can simply remove the two lines. I'll also remove them from the example. Thanks!

Thanks. I have another problem. When I test examples by using "python examples/image/test_lbfgs.py", the error is that File "examples/image/test_lbfgs.py", line 28, in AdvExArray, dis, loss, valueofc= attack.generate(xx, yy, **attack_params['LBFGS_MNIST']) TypeError: generate() missing 1 required positional argument: 'target_label'. I have not find the value of target_label.Could you give me some suggestion.

YaxinLi0-0 commented 3 years ago

Hi, I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Thank you very much!

Yes, you can simply remove the two lines. I'll also remove them from the example. Thanks!

Thanks. I have another problem. When I test examples by using "python examples/image/test_lbfgs.py", the error is that File "examples/image/test_lbfgs.py", line 28, in AdvExArray, dis, loss, valueofc= attack.generate(xx, yy, **attack_params['LBFGS_MNIST']) TypeError: generate() missing 1 required positional argument: 'target_label'. I have not find the value of target_label.Could you give me some suggestion.

Yes, for lbfgs attack we need to specify the target_label. Plz see the updated example.

qianxiao111 commented 3 years ago

Hi, I cannot reproduce the bug but you can simply remove the two lines of code import ipdb; ipdb.set_trace() in test_PGD.py as it is just a debugging tool.

Thank you very much!

Yes, you can simply remove the two lines. I'll also remove them from the example. Thanks!

Thanks. I have another problem. When I test examples by using "python examples/image/test_lbfgs.py", the error is that File "examples/image/test_lbfgs.py", line 28, in AdvExArray, dis, loss, valueofc= attack.generate(xx, yy, **attack_params['LBFGS_MNIST']) TypeError: generate() missing 1 required positional argument: 'target_label'. I have not find the value of target_label.Could you give me some suggestion.

Yes, for lbfgs attack we need to specify the target_label. Plz see the updated example.

Thank you very much!