tensorflow/model-optimization

[clustering] Possible wrong call of the centroids initializer from the ClusterWeights wrapper

Opened this issue · 1 comments

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.

Hi @aserenko Thank you for the reported bug. The fix is in this PR #951