![](/img/trans.png)
[英]ModuleNotFoundError: No module named 'nets' on Google Colab
[英]ModuleNotFoundError: No module named 'lanenet_model' - Google Colab
我正在嘗試將此存儲庫用於 google colab 中的lanenet 實現。 克隆存儲庫后,我想通過調用測試 model:
!python ./tools/test_lanenet.py --weights_path tusimple_lanenet.ckpt.data-00000-of-00001 --image_path test_img.jpg
我在“工具”子文件夾中調用文件“test_lanenet.py”。 此文件嘗試導入另一個 python 文件,該文件位於另一個子文件夾 (lanenet_model/lanenet.py) 中:
from lanenet_model import lanenet
但后來我得到了錯誤
Traceback (most recent call last):
File "./tools/test_lanenet.py", line 20, in <module>
from lanenet_model import lanenet
ModuleNotFoundError: No module named 'lanenet_model'
__init__.py
文件有人知道我能做些什么來解決這個問題嗎?
這是文件夾樹: lanenet 文件夾
嘗試將要運行的.py文件移動到項目根路徑下,然后運行。 如
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.