-1

I am trying to get output of primary capsule layer in capsule network. According to that I get 1152 number of 8D capsules. Here is one example

[ 0.19123563 -0.11994515 -0.7150253  -0.35917872 -0.02346791 -0.32390958
0.40772104 -0.01656894]

I am finding its magnitude using np.linalg.norm(). Accordingly magnitude is 0.98143137.I don't understand how this is calculated.

Anusha Mehta
  • 99
  • 1
  • 1
  • 10
  • It is of cause not possible to visualize 8D data, however, you can try tools like https://github.com/lmcinnes/umap to see an approximated 8D vector in 2D. – Pavel Prochazka Mar 01 '19 at 05:30

1 Answers1

1

The magnitude is the square root of the sum of the squares of all the entries of the vector. The following code would give you the same value: np.sqrt(np.sum(vector**2)). As far as graphing this, I'm unsure of what you are trying to visualize.

Adam Johnston
  • 1,399
  • 2
  • 12
  • 23