我正试图在Google上安装cleverhans软件包,但目前收到了ModuleNotFoundError的一个错误:没有名为“cleverhans.future”的模块
试图采用的代码:
!pip install -qq -e git+http://github.com/tensorflow/cleverhans.git#egg=cleverhans
import sys
sys.path.append('/content/src/cleverhans')
import cleverhans
from cleverhans.future.tf2.attacks import fast_gradient_method, \
basic_iterative_method, momentum_iterative_method我遵循了来自Bob的这个初始片段,但是仍然得到了一个错误:Installing cleverhans on Colaboratory
关于cleverhans的更多信息:https://pypi.org/project/cleverhans/#history
我正在尝试运行的代码教程:https://towardsdatascience.com/adversarial-machine-learning-mitigation-adversarial-learning-9ae04133c137
发布于 2022-05-22 13:56:38
下面是bug修复,添加以下一行:
pip install git+https://github.com/CNOCycle/cleverhans.git@feature/tf2.x来自:https://bytemeta.vip/repo/cleverhans-lab/cleverhans/issues/1150
https://stackoverflow.com/questions/72338061
复制相似问题