tensorflow_homographynet icon indicating copy to clipboard operation
tensorflow_homographynet copied to clipboard

Can you send model_90000.ckpt file to me please ?

Open TeyoungMegatron opened this issue 8 years ago • 10 comments

My GPU has 2GB so it not sufficient to train image. Can you send model_90000.ckpt file to me please. Best regard.

TeyoungMegatron avatar May 18 '17 14:05 TeyoungMegatron

I have sent the model_90000.ckpt file to your email. Please remember to check.

linjianz avatar May 19 '17 08:05 linjianz

Thank you very much for your reply When I download and use this model it show error as below. I think it about version or it not original train computer. So can you send "mean_var_out.npz" file to me please. Best wish

" DataLossError (see above for traceback): Unable to open table file model/model_mycnn/20170322_2/model_90000.ckpt: Failed precondition: model/model_mycnn/20170322_2/model_90000.ckpt: perhaps your file is in a different file format and you need to use a different restore operator? "

TeyoungMegatron avatar May 19 '17 16:05 TeyoungMegatron

You should change the model path to your own path where the model_90000.ckpt locate. And I have sent "mean_var_out.npz" file to you attached in the last email, it contained the mean and variance data of "batch normalization layer" when training. If you have any questions, please feel free to discuss with me.

linjianz avatar May 20 '17 01:05 linjianz

Hi I want to save my 'mean_var_out.npz' when I train but I have an error as following below. I put "np.savez('mean_var.npz', mean_var)" close to where you save model to file ( saver.save(sess, (dir_model + "/model_%d.ckpt") % (i+1)) )

Traceback (most recent call last): File "train_Te.py", line 341, in tf.app.run() File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 48, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "train_Te.py", line 338, in main np.savez('mean_var.npz0', mean_var) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 593, in savez _savez(file, args, kwds, False) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/npyio.py", line 665, in _savez pickle_kwargs=pickle_kwargs) File "/usr/local/lib/python2.7/dist-packages/numpy/lib/format.py", line 576, in write_array pickle.dump(array, fp, protocol=2, **pickle_kwargs) cPickle.PicklingError: Can't pickle <type 'module'>: attribute lookup builtin.module failed

TeyoungMegatron avatar Jun 04 '17 10:06 TeyoungMegatron

Firstly, make sure that you have add self.mean_var = [mean1,var1,mean2,var2,mean3,var3,mean4,var4,mean5,var5,mean6,var6,mean7,var7,mean8,var8] in the CNN model. And use mean_var = net.mean_var to get the variables in main function.

Secondly, you can save the models without save the mean values. And restore the last model to save the mean use np.savez('mean_var.npz', mean_var) (only need run one mini-batch).

Finally, from your traceback information, you may reinstall your numpy, or change the name of 'mean_var.npz' every time you save it...

linjianz avatar Jun 04 '17 13:06 linjianz

Oh!! Thank you for you kind. ^_^

TeyoungMegatron avatar Jun 04 '17 15:06 TeyoungMegatron

Hey linjian93. Could I have this pretrained model (model_90000.ckpt)? And.... could I ask how you got it? Which would be the process to generate it by myself? Thanks in advance for your time.

javimol avatar Nov 30 '17 00:11 javimol

@javimol You can read train_mycnn.py carefully to understand what it does firstly. Then you should prepare the dataset and tensorflow environment. Finally, run the code and get the model.

The code to save the model is saver.save(sess, (dir_model + "/model_%d.ckpt") % (i+1)), you can edit the save_iter or other parameters to suit for your situation.

linjianz avatar Nov 30 '17 02:11 linjianz

Can you send send or upload a preretrained model ?

absurdvision avatar Jan 05 '18 11:01 absurdvision

Please send me a copy of the file mean_var.npz. When I try to save the npz file using np.savez((dir_model + "mean_var_%d.npz")%(i+1), mean_var),an error occurred:TypeError: can't pickle _thread.lock objects.

ucmmesa avatar Aug 11 '18 10:08 ucmmesa