yusuketomoto / chainer-fast-neuralstyle

Chainer implementation of "Perceptual Losses for Real-Time Style Transfer and Super-Resolution".
MIT License
803 stars 226 forks source link

How to train the net work #67

Open gecong opened 8 years ago

gecong commented 8 years ago

Can anyone provide details about how to train the net work? I went to MSCOCO and downloaded the package. Do I need to do anything more before I run the train.py?

HighKo commented 8 years ago

You have to extract them into a sub-folder named dataset or provide the path directly.

shridharkini6 commented 8 years ago

what could be the potential problem for this error during training. My input images are of 256x256 jpg images Tried with CPU as well as GPU. Getting the error at xp.asarray(image, dtype=np.float32).transpose(2, 0, 1) in both cases. Traceback (most recent call last): File "train.py", line 117, in x[j] = load_image(imagepaths[i*batchsize + j], image_size) File "train.py", line 21, in load_image return xp.asarray(image, dtype=np.float32).transpose(2, 0, 1) File "/home/ubuntu/testing/.virtualenvs/venv1/lib/python2.7/site-packages/cupy/creation/from_data.py", line 47, in asarray return cupy.array(a, dtype=dtype, copy=False) File "/home/ubuntu/testing/.virtualenvs/venv1/lib/python2.7/site-packages/cupy/creation/from_data.py", line 27, in array return core.array(obj, dtype, copy, ndmin) File "cupy/core/core.pyx", line 1479, in cupy.core.core.array (cupy/core/core.cpp:50421) File "cupy/core/core.pyx", line 1493, in cupy.core.core.array (cupy/core/core.cpp:50031) TypeError: float() argument must be a string or a number

shridharkini6 commented 8 years ago

anyone has suggestion for this