DrSleep / tensorflow-deeplab-resnet

DeepLab-ResNet rebuilt in TensorFlow
MIT License
1.25k stars 429 forks source link

Fail to train when loading pretrained model #1

Closed chensiqin closed 7 years ago

chensiqin commented 7 years ago

Hi, I used tensorflow 0.12.0 on Ubuntu 16.04, CUDA 8.0. When I ran train.py which was loading pretrained model from model.ckpt-init or model.ckpt-pretrained, I met the tensorflow NotFoundError: Tensor name, but it was OK for deeplab_resnet.ckpt. BTW, would you please provide the scripts which you use to convert caffemodel to tensorflow checkpoints. Thank you in advance!

DrSleep commented 7 years ago

@chensiqin, hi!

The files model.ckpt-init and model.ckpt-pretrained are for DeepLab-LargeFOV: sorry for confusion, I will explicitly mention it in README. For conversion, I have just used the convert.py script from caffe-tensorflow, which saves the weights in a numpy format. Then I loaded these weights with the kaffe interface: net.load(...), and saved them already with the native TF interface. I can upload the whole pipeline later if it still needed.

wookayin commented 7 years ago

The checkpoints are available at: https://drive.google.com/drive/u/0/folders/0B_rootXHuswsTF90M1NWQmFYelU (link brought from DeepLab-LargeFOV)

chensiqin commented 7 years ago

Hi, @DrSleep I would appreciate it very much if could upload the whole pipeline of converting caffemodel to tensorflow checkpoints.

DrSleep commented 7 years ago

@chensiqin, I have updated the paragraph on the conversion: https://github.com/DrSleep/tensorflow-deeplab-resnet/blob/master/README.md#caffe-to-tensorflow-conversion

Please refer to it and, in particular, to the npy2ckpt.py file.

DrSleep commented 7 years ago

I will close this since there are no problems with loading the correct .ckpt file. Feel free to re-open it if any related issues occur.