sib*_*iby 4 github google-colaboratory
我试图按照此处提供的说明克隆和安装 Google Unrestricted 对抗性示例存储库。但我无法导入任何模块。首先,我克隆了存储库并更改到该目录。
!git clone https://github.com/google/unrestricted-adversarial-examples.git
cd unrestricted-adversarial-examples
Run Code Online (Sandbox Code Playgroud)
然后我使用了 pip install 命令。
!pip -e install bird-or-bicycle
Run Code Online (Sandbox Code Playgroud)
安装完成,没有任何错误。但是,当我尝试导入时,出现“找不到模块错误”。谁能告诉我我做错了什么?我在我的 PC 上尝试了相同的命令并且它有效。
import bird_or_bicycle
Run Code Online (Sandbox Code Playgroud)
ModuleNotFoundError: 没有名为“bird_or_bicycle”的模块
如果您查看Bird-or-bicycle 文档,您会发现 pip 安装后需要一个数据下载步骤。
如果您按照此处的说明进行操作并在笔记本单元中运行以下命令,则导入将起作用:
!git clone https://github.com/google/unrestricted-adversarial-examples
!pip install -e unrestricted-adversarial-examples/bird-or-bicycle
!bird-or-bicycle-download
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2377 次 |
最近记录: |