Google colaboratory:无法从utils导入'LRN2D'

问题描述 投票:0回答:1

我正在Google Colaboratory上试用Python Notebook https://github.com/TessFerrandez/research-papers/tree/master/facenet

我甚至无法在代码上运行第一个块,因为我收到此错误:

导入错误 回溯(最近的呼叫最后一次)在()

  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。请帮我

python tensorflow google-colaboratory
1个回答
0
投票

不要使用!pip install utils而是使用它。

!git clone https://github.com/TessFerrandez/research-papers.git
%cd research-papers/facenet
from model import create_model

在这里,utils意味着当地的utils.py,而不是一些其他项目的utils库

© www.soinside.com 2019 - 2024. All rights reserved.