Import error - ModuleNotFoundError: No module named 'model'
Import error - ModuleNotFoundError: No module named 'model'
我正在尝试复制 tensorlayer 在这个地址提到的例子:
https://github.com/tensorlayer/srgan/blob/master/train.py
它有以下导入语句:
import time, random
import numpy as np
import scipy, multiprocessing
import tensorflow as tf
import tensorlayer as tl
from model import get_G, get_D
from config import config
但是这个语句抛出错误:from model import get_G, get_D
ModuleNotFoundError: No module named 'model'
我在 'pypi.org'
上找不到这样的包
你导入的 model
是一个自定义模块,它放在这个 repo srgan
中,你也必须克隆 train.py
的依赖项。
我正在尝试复制 tensorlayer 在这个地址提到的例子:
https://github.com/tensorlayer/srgan/blob/master/train.py
它有以下导入语句:
import time, random
import numpy as np
import scipy, multiprocessing
import tensorflow as tf
import tensorlayer as tl
from model import get_G, get_D
from config import config
但是这个语句抛出错误:from model import get_G, get_D
ModuleNotFoundError: No module named 'model'
我在 'pypi.org'
上找不到这样的包你导入的 model
是一个自定义模块,它放在这个 repo srgan
中,你也必须克隆 train.py
的依赖项。