335 Star 1.5K Fork 858

MindSpore / docs

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
faq.md 796 Bytes
一键复制 编辑 原始数据 按行查看 历史
宦晓玲 提交于 2023-07-21 15:28 . modify the md links in 1.7

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
r1.7

搜索帮助