tegg89 / SRCNN-Tensorflow

Image Super-Resolution Using Deep Convolutional Networks in Tensorflow https://arxiv.org/abs/1501.00092v3
MIT License
595 stars 279 forks source link

The train is ok, but when I run "python main.py --is_train False --stride 21", there is an error. #5

Closed kitterive closed 7 years ago

kitterive commented 7 years ago

kedaxtb@kedaxtb:~/guoxiujiang/SRCNN-Tensorflow-master$ python main.py --is_train False --stride 21 I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcublas.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcudnn.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcufft.so locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcuda.so.1 locally I tensorflow/stream_executor/dso_loader.cc:128] successfully opened CUDA library libcurand.so locally {'batch_size': 128, 'c_dim': 1, 'checkpoint_dir': 'checkpoint', 'epoch': 10, 'image_size': 33, 'is_train': False, 'label_size': 21, 'learning_rate': 0.0001, 'sample_dir': 'sample', 'scale': 3, 'stride': 21} I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 0 with properties: name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate (GHz) 1.531 pciBusID 0000:02:00.0 Total memory: 11.90GiB Free memory: 11.62GiB W tensorflow/stream_executor/cuda/cuda_driver.cc:590] creating context when one is currently active; existing: 0x30b7230 I tensorflow/core/common_runtime/gpu/gpu_device.cc:885] Found device 1 with properties: name: TITAN X (Pascal) major: 6 minor: 1 memoryClockRate (GHz) 1.531 pciBusID 0000:03:00.0 Total memory: 11.90GiB Free memory: 11.75GiB I tensorflow/core/common_runtime/gpu/gpu_device.cc:906] DMA: 0 1 I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 0: Y Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:916] 1: Y Y I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:0) -> (device: 0, name: TITAN X (Pascal), pci bus id: 0000:02:00.0) I tensorflow/core/common_runtime/gpu/gpu_device.cc:975] Creating TensorFlow device (/gpu:1) -> (device: 1, name: TITAN X (Pascal), pci bus id: 0000:03:00.0) WARNING:tensorflow:From /home/kedaxtb/guoxiujiang/SRCNN-Tensorflow-master/model.py:76 in train.: initialize_all_variables (from tensorflow.python.ops.variables) is deprecated and will be removed after 2017-03-02. Instructions for updating: Use tf.global_variables_initializer instead. [] Reading checkpoints... [] Load SUCCESS Testing... Traceback (most recent call last): File "main.py", line 46, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 43, in run sys.exit(main(sys.argv[:1] + flags_passthrough)) File "main.py", line 43, in main srcnn.train(FLAGS) File "/home/kedaxtb/guoxiujiang/SRCNN-Tensorflow-master/model.py", line 112, in train imsave(merge, os.path.join(os.getcwd(), config.sample_dir)) File "/home/kedaxtb/guoxiujiang/SRCNN-Tensorflow-master/utils.py", line 191, in imsave return scipy.misc.imsave(path, image) File "/usr/local/lib/python2.7/dist-packages/scipy/misc/pilutil.py", line 195, in imsave im = toimage(arr, channel_axis=2) File "/usr/local/lib/python2.7/dist-packages/scipy/misc/pilutil.py", line 287, in toimage raise ValueError("'arr' does not have a suitable array shape for " ValueError: 'arr' does not have a suitable array shape for any mode.

tegg89 commented 7 years ago

@kitterive I updated another operation after getting result file. Please look for it. Thanks for your interest! :)