Justin-Tan / generative-compression

TensorFlow Implementation of Generative Adversarial Networks for Extreme Learned Image Compression
MIT License
511 stars 108 forks source link

The model file .mata I've trained 52 epoch on Citycapes can't be used in compress single image #30

Open RaysonSJTU opened 5 years ago

RaysonSJTU commented 5 years ago

The model .mata I've trained 52 epoch on Citycapes can't be used in compress single image, and the storage of mata is 7823KB, which is not similar to noiseMScsC8_epoch15.ckpt-15.meta 24880KB. Did I trained in the wrong way? Lookingfoward you response, thank you.

RaysonSJTU commented 5 years ago

When I use 52 epoch model file my_network_last.ckpt-52.meta to compress single image:

compress.py -r "/home/shr/generative-compression-master/checkpoints/my_network_last.ckpt-52" -i "/home/shr/generative-compression-master/kodim22.png" -o "/home/shr/generative-compression-master/522.png"

the Error happend: 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 48, in single_compress new_saver = tf.train.import_meta_graph('{}.meta'.format(args.restore_path)) File "/home/shr/anaconda3/lib/python3.6/site-packages/tensorflow/python/training/saver.py", line 1955, in import_meta_graph *kwargs) File "/home/shr/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/meta_graph.py", line 743, in import_scoped_meta_graph producer_op_list=producer_op_list) File "/home/shr/anaconda3/lib/python3.6/site-packages/tensorflow/python/util/deprecation.py", line 432, in new_func return func(args, **kwargs) File "/home/shr/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 460, in import_graph_def _RemoveDefaultAttrs(op_dict, producer_op_list, graph_def) File "/home/shr/anaconda3/lib/python3.6/site-packages/tensorflow/python/framework/importer.py", line 227, in _RemoveDefaultAttrs op_def = op_dict[node.op] KeyError: 'BatchDatasetV2'

How can I do it, if I train the model in a wrong way?