-
Notifications
You must be signed in to change notification settings - Fork 216
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
Discussion on batch fetch strategy #28
Comments
Thanks for your comments!
|
Thank your for your quick answer. 2, Just repeat examples (maybe 60 images per class) of a class (or a person) infinitely. And choose index of 3, Glad that you didn't close this issue^_^. Actually, this issue is about batch fetch strategy. I further tried to test the training set with However, the used loss (calculated using your batch fetch strategy) for training in Tensorflow is close to 0.01, as shown in the above figure, which means that the model will almost not optimize any more. I want to use your batch fetch strategy for image classification problems. |
|
In your TF codes, you first
shuffle
person ids and then repeat them forever. In training, you choosebatch_p
from the dataset according to the queue. For one person, you randomly choosebatch_k
examples each time. Am I right? For this situation, I have two questions:The order of person ids is repeated. It means that each person will only be compared within
batch_p=25
people around them. You know, some person are easier to identify. You just maximize the margins in this small group.How about choosing examples of one person in a
repeated way
? It enables every example to be trained repeated. I know thatrandomly choose first batch_k
is theoretically OK. What about their differences on performance? Are them totally equivalent?By the way, based on your codes, I try to implement a ResNet-50 fine-tuning baseline (just modify the last FC layer) for image classification (on CUB-200-2011). For testing, I feed data to the model in a normal ordered way. But the test accuracy (for classification) is only 22%. (It is supposed to be abound 81%). The training accuracy rises to 100% and the loss drops to 0.03 in 5000 iterations (about 100 epochs). Though training accuracy is of nonsense in this situation. What might be wrong? Is is due to the sampling strategy? Thank you.
The text was updated successfully, but these errors were encountered: