335 Star 1.5K Fork 862

MindSpore / docs

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
faq.md 797 Bytes
Copy Edit Raw Blame History
TingWang authored 2023-09-18 10:08 . update link logo

FAQ

查看源文件

Q: FastGradientSignMethod未指定loss_fn时报错Function construct_wrapper, The number of parameters of this function is 9, but the number of provided arguments is 10.怎么办?

A: class mindarmour.adv_robustness.attacks.FastGradientSignMethod(network, eps=0.07, alpha=None, bounds=(0.0,1.0), is_targeted=False, loss_fn=None)中,如果传入的network不是WithLossCell的形式,需要指定Loss_fn,由执行过程自动执行WithLossCell操作,否则会出现输入参数数量和函数所需参数数量不一致的错误。

1
https://gitee.com/mindspore/docs.git
git@gitee.com:mindspore/docs.git
mindspore
docs
docs
master

Search

53164aa7 5694891 3bd8fe86 5694891