I tried to code a manual version of the famous PCA algorithm to reduce the dimensions of mnist dataset.
I also tried TSNE separately on mnist to visualize the dataset better.
It is recommended to use a dimensionality reduction algorithms on datasets before applying TSNE. For more info you can visit scikit-learn TSNE