-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Checkpoint #7
Comments
Hey @arminXerror, I have given a sample code to perform just prediction in another issue, please check #4 (comment). I haven't tested the code, but you can get the idea. |
Hey @dgurkaynak, Sorry for taking your time, I am trying to understand your code line by line and have questions in my mind I would be appreciated if you can help me to find out the answer.
I know is so much.... thanks in advance. |
|
Hey @dgurkaynak, I really appreciate your help. If I want to remove the weights of the final layer and "re-train" the net again with the new data set. Should I do as follow? In ResNet, you load pre-trained weights as follow:
should I just remove skip_layers and change the line like below? is going to re-train the net again with my new data set or I have to change another part as well? Thanks in advance. |
If the number of your classes is not 1000, the weights of final layer is initialised from scratch. You don't have to do anything. |
Hey @dgurkaynak, Great, I have 10 classes in my dataset. What will happen to the network if I remove skip_layers as explained? Thanks in advance. |
In fact tensorflow-cnn-finetune/resnet/model.py Lines 93 to 108 in 125e343
Initially it was used for skipping weight transfer for that layers. Later, I commented out that check because I wanted to transfer weights for all layers except the last layer. Starting these layers from transferred weights performs better than initialising random. If you want to initalise them random, you can uncomment these 2 lines. |
Hey @dgurkaynak,
I want to use the checkpoint which saved during training and validating. I mean, I want to evaluate model by using saved checkpoint on test_data. First I load my test data like this:
Then I have to restore the checkpoint which I did it in a new Session
saver.restore(sess, checkpoint_path)
Final step, I have to feed the accuracy with all my test images and labels.
print('Test_Accuracy: {:.3%}'.format(accuracy.eval({x: **??**, y_true: **??**})))
I have tried to feed it by
test_preprocessor.images
andtest_preprocessor. labels
but I got an error because images and labels are path and string not float. what should be the value for ?? in above line?thanks in advance.
The text was updated successfully, but these errors were encountered: