Margin loss

We learned that the capsule returns a vector and the length of a vector represents the probability of the existence of the features. Say our network is trying to recognize the handwritten digits in an image. To detect multiple digits in a given image, we use margin loss, , for each digit capsule, , as follows:

Here, the following is the case:

  • , if the digit of a class is present
  • is the margin, and is set to 0.9 and is set to 0.1
  • prevents the initial learning from shrinking the lengths of the vectors of all the digit capsules and is usually set to 0.5

The total margin loss is the sum of the loss of all classes, , as follows:

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

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