Converting similarity matrix before inputting to t-sne
You need to scale the values by some constant factor so the sum of every entry in the matrix results in 1.0.

You can achieve this by using mat /= mat.sum(), where mat is your matrix.