Reconstruction loss

In order to make sure that the network has learned the important features in the capsules, we use reconstruction loss. This means that we use a three-layer network called a decoder network, which tries to reconstruct the original image from the digit capsules:

Reconstruction loss is given as the squared difference between the reconstructed and original image, as follows:

The final loss is given as follows:

Here, alpha is a regularization term, because we don't want the reconstruction loss to have more priority than the margin loss. So, alpha is multiplied by the reconstruction loss to scale down its importance, and is usually set to 0.0005.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset