www0wwwjs1 / Matrix-Capsules-EM-Tensorflow

A Tensorflow implementation of CapsNet based on paper Matrix Capsules with EM Routing
Apache License 2.0
218 stars 83 forks source link

How to add a dateset to the get_coord_add function #29

Open chaserxin opened 6 years ago

chaserxin commented 6 years ago

I want to train the imdb dataset

ashleylid commented 6 years ago

I have another dataset I would like to try, but I am also not sure how to create this matrix. I second @chaserxin

from the paper "We therefore share the transformation matrices between different positions of the same capsule type and add the scaled coordinate (row, column) of the center of the receptive field of each capsule to the first two elements of the right-hand column of its vote matrix. We refer to this technique as Coordinate Addition. This should encourage the shared final transformations to produce values for those two elements that represent the fine position of the entity relative to the center of the capsule’s receptive field"

SafaaDaf commented 6 years ago

Anyone get a solution about how to create this matrix ? @chaserxin @kleinash

chirag-singh commented 6 years ago

@chaserxin @SafaaDaf U can run the code once as it is , u will get the shape_mismatch error , Just look the shape which u want and then extend the given matrix by scaling in both the dimensions ,such that it resolves the error.

SafaaDaf commented 6 years ago

@chirag-singh That's what I tried and the error gone, but I wonder how this matrix would affect the accuracy ?