Closed 13331151 closed 6 years ago
Actually, this is from your code, you should better double-check it by you self.
b_IJ = tf.zeros(shape=[1, 1152, 10, 1, 1], dtype=np.float32)
capsules = routing(self.input, b_IJ)
assert c_IJ.get_shape() == [cfg.batch_size, 1152, 10, 1, 1]
this is Eq. 3: the sum operation is act on capsule j (k) . In my code, c_IJ has shape [1, 1, 1152, 10, 1], corresponding to [1, 1, num_caps_i, num_caps_j, 1]. So, I think that dim=3 is right