Autoencoder, Capsule Networks, Attention Mechanism, Deep Learning, Artificial Intelligence.
__init__(self, num_capsule, dim_capsule, routings=3, **kwargs): super(CapsuleLayer, self).__init__(**kwargs) self.num_capsule = num_capsule self.dim_capsule = dim_capsule self.routings = routings def build(self, input_shape): self.kernel = self.add_weight(name='capsule_kernel',