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

Understanding issues of custom layer- "ClusteringLayer" #3

Open
TanmoyDam opened this issue Oct 20, 2018 · 0 comments
Open

Understanding issues of custom layer- "ClusteringLayer" #3

TanmoyDam opened this issue Oct 20, 2018 · 0 comments

Comments

@TanmoyDam
Copy link

Thank you for sharing the code.
I am new in Keras. I know it is a stupid idea to ask this bellow question.
In ClusteringLayer, the encoder.output shpae is (?,10) which has been passed through the custom layer. When I pass the encoder.output weights to the custom layer "Bulid function", it generates weights for self.clustering by the size of(10,10) i.e the n_clusters is 10 and input_shape[1] is 10. Is it so? or I am missing something.
In "Call function", specifically in this line, q = 1.0 / (1.0 + (K.sum(K.square(K.expand_dims(inputs, axis=1) - self.clusters), axis=2) / self.alpha)), why do you use K.expand_dims? What is the purpose of using this?

Please help me to figure out these two problems.
Again thank you for sharing the beautiful code.

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

No branches or pull requests

1 participant