CompVis / adaptive-style-transfer

source code for the ECCV18 paper A Style-Aware Content Loss for Real-time HD Style Transfer
https://compvis.github.io/adaptive-style-transfer/
GNU General Public License v3.0
730 stars 140 forks source link

checkpoint_dir #10

Closed grenache closed 5 years ago

grenache commented 5 years ago

While trying to port to Colab, we ran across this issue in model.py screen shot 2018-10-23 at 7 09 15 pm

asanakoy commented 5 years ago

Could you please describe the issue in details?

grenache commented 5 years ago

The above screenshot is from someone who I asked to debug.

Not sure if this is helpful, but this is the notebook output: Inference. Start inference. [*] Reading latest checkpoint from folder ./models/model_van-gogh/checkpoint. [*] Reading latest checkpoint from folder ./models/model_van-gogh/checkpoint_long. [!] Load failed... 0it [00:00, ?it/s] Inference is finished.

asanakoy commented 5 years ago

Check that the model snapshot file is in the checkpoint dir. Try to print all the paths. Look like it simply doesn't find the checkpoint file.

grenache commented 5 years ago

once the main.py is run the 4 files in the in models/model_van-gogh are moved to ./models/checkpoint_long/ checkpoint model16_van-gogh_bks10_flw100_300000.ckpt-300000.data-00000-of-00001 model16_van-gogh_bks10_flw100_300000.ckpt-300000.index model16_van-gogh_bks10_flw100_300000.ckpt-300000.meta

Directories are created in ./models/ checkpoint checkpoint_long inference inference_ckpt0_sz1280 sample

All are empty besides checkpoint_long that are apart of the tar.gz. checkpoint remains the same.

dimakot55 commented 5 years ago

That seems to be correct. I guess that the problem lies in the filesytem naming convention used in Colab: we've only tried to run the script on local machine so I can't share my own experience with you. I would recommend you to manually output the values of os.listdir(checkpoint_dir) and os.path.join(checkpoint_dir, ckpt_name) and dig in this direction for a solution. You can also check your current working directory in Colab using something like os.getcwd().

asanakoy commented 5 years ago

Closed due to inactivity. Feel free to open it again if you have any further questions.