python - Google colaboratory:无法从 utils 导入“LRN2D”
问题描述
我正在 Google Colaboratory 上试用 Python Notebook https://github.com/TessFerrandez/research-papers/tree/master/facenet 。
我什至无法在代码上运行第一个块,因为我收到了这个错误:
() 中的ImportError
Traceback(最近一次调用最后一次)
1 from model import create_model
/content/model.py in ()
12 import utils
13 from utils import LRN2D
14
15 def create_model():
ImportError:无法导入名称“LRN2D”
我已经 !pip 安装了 utils。请帮我
解决方案
不要!pip install utils
只使用它。
!git clone https://github.com/TessFerrandez/research-papers.git
%cd research-papers/facenet
from model import create_model
这里的utils
意思是 local utils.py
,而不是其他项目的一些 utils 库
推荐阅读
- python-3.x - 尝试使用 systemd 启动 python 脚本,但它在 Raspberry Pi 上不起作用
- python - 数组到数据框中的列
- spring - 如何使用 Reactor 保存嵌套实体?
- reactjs - 将跟踪选项应用于 redux-thunk 设置
- git - 每当执行拉/推操作时,Visual Studio 2019 都会关闭所有打开的选项卡
- wordpress - wordpress 整数日期到日期
- android - Android init 进程将在哪里创建线程
- javascript - 有没有办法在不重新启动 Chrome 的情况下重新加载内容脚本?(Chrome 扩展程序)
- css - 如何设置tinymce textareas高度并删除文本区域的下框
- python - 如何修改 sagemaker 中的预测函数以返回形状值和预测?