PU-GAN icon indicating copy to clipboard operation
PU-GAN copied to clipboard

Cannot restore checkpoint

Open KernelA opened this issue 3 years ago • 1 comments

I download the pretrained model from Google Drive by link: https://drive.google.com/open?id=12kWoB0-_tflq65RNpJEnNGTTwPXa6IOH

Run project in Docker with provided Dockerfile, but got error when restoring model:

pu-gan_1  | None
pu-gan_1  | Traceback (most recent call last):
pu-gan_1  |   File "./pu_gan.py", line 47, in <module>
pu-gan_1  |     tf.app.run()
pu-gan_1  |   File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/platform/app.py", line 125, in run
pu-gan_1  |     _sys.exit(main(argv))
pu-gan_1  |   File "./pu_gan.py", line 43, in main
pu-gan_1  |     run()
pu-gan_1  |   File "./pu_gan.py", line 39, in run
pu-gan_1  |     model.test()
pu-gan_1  |   File "/home/PU-GAN/Upsampling/model.py", line 259, in test
pu-gan_1  |     saver.restore(self.sess, checkpoint_path)
pu-gan_1  |   File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/training/saver.py", line 1526, in restore
pu-gan_1  |     raise ValueError("Can't load save_path when it is None.")
pu-gan_1  | ValueError: Can't load save_path when it is None.
pu-gan_pu-gan_1 exited with code 1

This function returns None instead checkpoint_path https://github.com/liruihui/PU-GAN/blob/69cf7d7f956c7c31f4a6d9213d8b11a658c52b9c/Common/model_utils.py#L126

Checkpoint files inside container:

ls -1 ./model/
model-100.data-00000-of-00001
model-100.index
model-100.meta

KernelA avatar Jun 13 '21 14:06 KernelA

I think this issue #3 is helpful for you.

Nhunguts avatar Jun 26 '21 06:06 Nhunguts