-
Notifications
You must be signed in to change notification settings - Fork 105
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
compress single image with error #16
Comments
You should have the input image as a JPEG or PNG instead of BMP or GIF. |
thank you for your reply, but there is an error when I train the model on ADE20k dataset: I have change the input image's width to 512px, I checked the code, the shape of w_hat and Gv is not same when sampling noise in model.py, can you give me some advices? Thanks! |
I have the same problem, have you solved it? |
Traceback (most recent call last):
File "compress.py", line 80, in
main()
File "compress.py", line 77, in main
single_compress(config_test, args)
File "compress.py", line 60, in single_compress
Utils.single_plot(0, 0, sess, gan, handle, save_path, config, single_compress=True)
File "/home/zqzhu/EX/GAN_CC/generative-compression-master/utils.py", line 107, in single_plot
r, g = sess.run([real, gen], feed_dict={model.training_phase:True, model.handle: handle})
File "/home/zqzhu/tensorflow3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 900, in run
run_metadata_ptr)
File "/home/zqzhu/tensorflow3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1135, in _run
feed_dict_tensor, options, run_metadata)
File "/home/zqzhu/tensorflow3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1316, in _do_run
run_metadata)
File "/home/zqzhu/tensorflow3/lib/python3.5/site-packages/tensorflow/python/client/session.py", line 1335, in _do_call
raise type(e)(node_def, op, message)
tensorflow.python.framework.errors_impl.InvalidArgumentError: Expected image (JPEG, PNG, or GIF), got unknown format starting with 'BM\212\000\014\000\000\000\000\000\212\000\000\000|\000'
[[Node: DecodePng = DecodePngchannels=3, dtype=DT_UINT8]]
[[Node: IteratorGetNext = IteratorGetNextoutput_shapes=[[?,?,?,3]], output_types=[DT_FLOAT], _device="/job:localhost/replica:0/task:0/device:CPU:0"]]
[[Node: generator/decoder/conv2d_transpose_3/conv2d_transpose-0-VecPermuteNHWCToNCHW-LayoutOptimizer/_395 = _HostRecvclient_terminated=false, recv_device="/job:localhost/replica:0/task:0/device:GPU:0", send_device="/job:localhost/replica:0/task:0/device:CPU:0", send_device_incarnation=1, tensor_name="edge_1470_...tOptimizer", tensor_type=DT_INT32, _device="/job:localhost/replica:0/task:0/device:GPU:0"]]
The compressed image format is bmp, and then occurre an error.
The text was updated successfully, but these errors were encountered: