首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >ModuleNotFoundError:没有名为“cleverhans.future”的模块

ModuleNotFoundError:没有名为“cleverhans.future”的模块
EN

Stack Overflow用户
提问于 2022-05-22 13:37:01
回答 1查看 391关注 0票数 0

我正试图在Google上安装cleverhans软件包,但目前收到了ModuleNotFoundError的一个错误:没有名为“cleverhans.future”的模块

试图采用的代码:

代码语言:javascript
复制
!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

EN

回答 1

Stack Overflow用户

发布于 2022-05-22 13:56:38

下面是bug修复,添加以下一行:

代码语言:javascript
复制
pip install git+https://github.com/CNOCycle/cleverhans.git@feature/tf2.x

来自:https://bytemeta.vip/repo/cleverhans-lab/cleverhans/issues/1150

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/72338061

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档