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
Siamese networks #69
Siamese networks #69
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. We'll get the siamese architecture graph working with the TF2 update. We will have some fun merge conflicts with my training improvements branch, but that's ok
if mixup_alpha > 0 and keep_paths: | ||
if siamese and keep_paths: | ||
yield _make_batch_siamese(in_batch, out_batch) + (paths_in_batch,) | ||
elif siamese: | ||
yield _make_batch_siamese(in_batch, out_batch) | ||
elif mixup_alpha > 0 and keep_paths: | ||
yield _mixup_batch(in_batch, out_batch, mixup_alpha) + (paths_in_batch[:batch_size//2],) | ||
elif mixup_alpha > 0: | ||
yield _mixup_batch(in_batch, out_batch, mixup_alpha) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This logic is starting to get messy. I wonder if there is any way to clean it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah I think the pattern here is an on_batch_full callback which could handle siamese nets, mixup and data augmentation. Unfortunately, Keras chokes when the generator yields paths but it is a really helpful option for evaluation, outlier plots and debugging
* siamese models with random categorical task verification
* siamese models with random categorical task verification
* siamese models with random categorical task verification
* siamese models with random categorical task verification
Still can't get the inner model to expand in the architecture diagram but oh well.