Skip to content
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

Merged
merged 40 commits into from Oct 29, 2019
Merged

Siamese networks #69

merged 40 commits into from Oct 29, 2019

Conversation

lucidtronix
Copy link
Collaborator

Still can't get the inner model to expand in the architecture diagram but oh well.
architecture_graph_saimese_sex_hyper2
per_class_roc_saimese_sex
metric_history_saimese_sex_hyper
per_class_roc_saimese_sex_hyper

Copy link
Contributor

@ndiamant ndiamant left a 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

Comment on lines -96 to 103
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)
Copy link
Contributor

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.

Copy link
Collaborator Author

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

ml4cvd/TensorMap.py Outdated Show resolved Hide resolved
@ndiamant ndiamant mentioned this pull request Oct 25, 2019
16 tasks
@lucidtronix lucidtronix merged commit 2fbcfad into master Oct 29, 2019
@lucidtronix lucidtronix deleted the sf_siam branch October 29, 2019 15:24
lucidtronix added a commit that referenced this pull request Jan 13, 2023
* siamese models with random categorical task verification
lucidtronix added a commit that referenced this pull request Jan 13, 2023
* siamese models with random categorical task verification
lucidtronix added a commit that referenced this pull request Jan 13, 2023
* siamese models with random categorical task verification
lucidtronix added a commit that referenced this pull request Jan 13, 2023
* siamese models with random categorical task verification
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants