tensorfreitas / Siamese-Networks-for-One-Shot-Learning

Implementation of Siamese Neural Networks for One-shot Image Recognition

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

train epoch acc have no change

myegdfz opened this issue · comments

firstly thx for yr work, and since the version, i made some change in your code, but it works nothing, and every epoch the accurcy rate was not change, like this.

4(}32%7( MGBF_$ZW`E%1

Hi! could you elaborate on what did you change to the code?

since the original not at version tf 2.4, so I change the _write_logs_to_tensorboard to adapt version 2.4, this one
image
, and the Modified_SGD class's learning_rate, because lr is the father class's attribute.
image

and i also have a question, i modified the structure of the net, replace the original convolutional layer with vgg16 and add a netvald layer before the last layer
image
but loss will increase to 36.xx from 5.0. and I can't understand.

Thanks for the details. I would suggest for making sure that the original architecture will decrease the training error in a small dataset.

Only after that I would start making adjustments to the model architecture and follow the same process. Make sure you test adam/modified SGD with different learning rates. By making big adjustments it's hard to identify the reason of non convergence. Hope I was helpful

do you mean if my initial loss is too high, it would be stoped very fast? maybe at iteration 4.

No, I was meaning that making sure you can guarantee first that the architecture converges in a small dataset and that the training loss is decreasing.

I would suggest reading this blog post by Andrej Karpathy, especially the overfit section:

http://karpathy.github.io/2019/04/25/recipe/