Justin-Tan / generative-compression

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

how to generate checkpoint file for noise sampling model #24

Open ClaytonXia opened 5 years ago

ClaytonXia commented 5 years ago

i have downloaded the noise sampling model but no checkpoint file found, could you tell how to generate one with detail? thanks

inhoc commented 5 years ago

unzip the file and place it to checkpoint dir. Then modify config.py.

class directories: checkpoints = 'checkpoints/noiseMScsC8' latest_filename = 'noiseMScsC8_epoch15.ckpt-15.index'

and replace the code such as (compress.py) from ckpt = tf.train.get_checkpoint_state(directories.checkpoints) to ckpt = tf.train.get_checkpoint_state(directories.checkpoints, latest_filename=directories.latest_filename)

it will load. But TF 1.3, 1.8 and 1.13 I get an error utf-8 loading error.

18829288698 commented 4 years ago

Hi teacher, I have a question,replace ckpt = tf.train.get_checkpoint_state (directories.checkpoints) with ckpt = tf.train.get_checkpoint_state (directories.checkpoints, Latest_filename = directories.Latest_filename) will report an error TypeError: get_checkpoint_state () got an unexpected keyword argument 'Latest_filename', do you know how to solve it?