atriumlts / subpixel

subpixel: A subpixel convnet for super resolution with Tensorflow
MIT License
2.13k stars 301 forks source link

image size problem #13

Closed EderSantana closed 8 years ago

EderSantana commented 8 years ago

@dribnet The last commit where things work for me is 0bee08befd160d370e50bf2f9827aeca07c432a2 After that I'm getting the following error:

I tensorflow/core/common_runtime/gpu/gpu_device.cc:839] Creating TensorFlow device (/gpu:0) -> (device: 0, name: GeForce GTX 680, pci bus id: 0000:04:00.0)
Traceback (most recent call last):
  File "main.py", line 58, in <module>
    tf.app.run()
  File "/home/eder/anaconda2/lib/python2.7/site-packages/tensorflow/python/platform/app.py", line 30, in run
    sys.exit(main(sys.argv))
  File "main.py", line 42, in main
    dcgan.train(FLAGS)
  File "/home/eder/python/ponynet/model.py", line 108, in train
    save_images(sample_images, [8, 8], './samples/reference.png')
  File "/home/eder/python/ponynet/utils.py", line 21, in save_images
    return imsave(inverse_transform(images), size, image_path)
  File "/home/eder/python/ponynet/utils.py", line 40, in imsave
    return scipy.misc.imsave(path, merge(images, size))
  File "/home/eder/python/ponynet/utils.py", line 30, in merge
    h, w = images.shape[1], images.shape[2]
IndexError: tuple index out of range

I checked that images is an empty tensor. Do you know where that might have been introduced?

dribnet commented 8 years ago

Sorry about that. Can you try running the download step again? This step now downloads the images and partitions them into separate train / validation / test directories.

EderSantana commented 8 years ago

Thanks, Tom! the new download fixed everything

evgenykam commented 7 years ago

@EderSantana Hi, I'm getting the same error running your code. How can I fix it? Thank you in advance!

I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: Tesla K40c, pci bus id: 0000:81:00.0) Traceback (most recent call last): File "main.py", line 58, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 42, in main dcgan.train(FLAGS) File "/home/evgeny/subpixel-master/model.py", line 108, in train save_images(sample_input_images, [8, 8], './samples/inputs_small.png') File "/home/evgeny/subpixel-master/utils.py", line 22, in save_images return imsave(inverse_transform(images[:num_im]), size, image_path) File "/home/evgeny/subpixel-master/utils.py", line 41, in imsave return scipy.misc.imsave(path, merge(images, size)) File "/home/evgeny/subpixel-master/utils.py", line 31, in merge h, w = images.shape[1], images.shape[2] IndexError: tuple index out of range