eriklindernoren / Keras-GAN

Keras implementations of Generative Adversarial Networks.
MIT License
9.18k stars 3.14k forks source link

ImportError: No module named 'data_loader' #59

Open erwin999888 opened 6 years ago

erwin999888 commented 6 years ago

from future import print_function, division import scipy

from keras.datasets import mnist from keras_contrib.layers.normalization import InstanceNormalization from keras.layers import Input, Dense, Reshape, Flatten, Dropout, Concatenate from keras.layers import BatchNormalization, Activation, ZeroPadding2D from keras.layers.advanced_activations import LeakyReLU from keras.layers.convolutional import UpSampling2D, Conv2D from keras.models import Sequential, Model from keras.optimizers import Adam import datetime import matplotlib.pyplot as plt import sys from data_loader import DataLoader import numpy as np import os

================================================= ImportError Traceback (most recent call last)

in () 13 import matplotlib.pyplot as plt 14 import sys ---> 15 from data_loader import DataLoader 16 import numpy as np 17 import os ImportError: No module named 'data_loader'
jkim- commented 6 years ago

Are you trying to use the pix2pix library? Try creating a file named "__init__.py" in the directory.

miranthajayatilake commented 6 years ago

The file data_loader.py should be in the same directory.

MikhailLenko commented 4 years ago

It appears you are also working through the (fantastic) Manning series "GANs in Action". Your code appears to be the final section, on CycleGANs. The authors note that the data_loader is provided in their GitHub repo for the chapter. Check out their workbook here: https://github.com/GANs-in-Action/gans-in-action/blob/master/chapter-9/Chapter9_CycleGAN.ipynb