tensorflow / tensorflow/model-optimization
[clustering] Possible wrong call of the centroids initializer from the ClusterWeights wrapper
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 349
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 1
Description
An instance of the centroids initializer expects to be initialized with data_format.
However, instead of data_format it gets num_channels here: https://github.com/tensorflow/model-optimization/blob/v0.7.1/tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper.py#L218 I suppose that line is erroneous. This may cause looping over the the wrong axis during clusterization when data_format is channels_first.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Inspect tensorflow_model_optimization/python/core/clustering/keras/cluster_wrapper.py around line 218 and compare the call with clustering_centroids.py line 47. Check the channels_first path and relevant clustering behavior; done means the initializer receives the intended data-format value and axis handling is correct.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- keras, python, tensorflow
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100