Search code examples
pythontensorflowmoduleimporterror

Import error - ModuleNotFoundError: No module named 'model'


I am trying to replicate the example mentioned at this address by tensorlayer:

https://github.com/tensorlayer/srgan/blob/master/train.py

It has below import statements:

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

But this statement is throwing error: from model import get_G, get_D

ModuleNotFoundError: No module named 'model'

I am unable to find such package on 'pypi.org'


Solution

  • The model you imported is a custom module, it is placed in this repo srgan, you got to clone the dependency of train.py too.