jmiller656 / EDSR-Tensorflow

Tensorflow implementation of Enhanced Deep Residual Networks for Single Image Super-Resolution
MIT License
330 stars 107 forks source link

test error #41

Open skdingding opened 5 years ago

skdingding commented 5 years ago

when i test only one image using your trained model,something wrong at Predicting... Traceback (most recent call last): File "test.py", line 29, in outputs = network.predict(x) File "/home/dingyuyang/EDSR-Tensorflow-master/model.py", line 172, in predict return self.sess.run(self.out,feed_dict={self.input:x}) File "/home/dingyuyang/.conda/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 929, in run run_metadata_ptr) File "/home/dingyuyang/.conda/envs/tensorflow/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1128, in _run str(subfeed_t.get_shape()))) ValueError: Cannot feed value of shape (50, 50, 3) for Tensor 'Placeholder:0', which has shape '(?, 50, 50, 3)' can you help me?

jian3xiao commented 4 years ago

you can use: inputs = np.expand_dims(inputs, 0) outputs = network.predict(inputs)

to make the shape of inputs is [1, h, w, 3]

weizhiliang0520 commented 3 years ago
feed_dict={self.input:x})

after--->feed_dict={self.input:[x]})