-
Notifications
You must be signed in to change notification settings - Fork 332
[Clustering] Adding a unit test to check all needed weights are returned by cluster_wrapper. #597
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
Conversation
tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper_test.py
Outdated
Show resolved
Hide resolved
tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper_test.py
Show resolved
Hide resolved
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.
Looks good to me.
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
1 similar comment
We found a Contributor License Agreement for you (the sender of this pull request), but were unable to find agreements for all the commit author(s) or Co-authors. If you authored these, maybe you used a different email address in the git commits than was used to sign the CLA (login here to double check)? If these were authored by someone else, then they will need to sign a CLA as well, and confirm that they're okay with these being contributed to Google. ℹ️ Googlers: Go here for more info. |
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
1 similar comment
CLAs look good, thanks! ℹ️ Googlers: Go here for more info. |
…r_wrapper. Change-Id: I60b0c901b4d7b699cc44848481518df09d36a97a
Hi @daverim This is a small PR that just adds a test and it is ready to be merged. |
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.
Some small nits here, but will fix these on my side
keras.layers.Dense(8, input_shape=input_shape), | ||
number_of_clusters=2, | ||
cluster_centroids_init=CentroidInitialization.LINEAR | ||
original_layer = cluster_wrapper.ClusterWeights( |
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.
The test currently fails with this error at line 252:
AttributeError: 'ClusterWeights' object has no attribute 'outputs'
You may want to wrap this in a keras model for the test to pass.
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.
It looks like someone on your side had already fixed this yesterday: https://github.com/tensorflow/model-optimization/blame/master/tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper_test.py#L246
Should I still update this PR anyway?
This is a follow-up PR to #575 based on this comment.