Hi there,
AlexNet's fc7 layer has 4096 features (=CNN codes) so all you have to do is to forward propagate all the 50,000 images and for each image store it's CNN code. You will basically get a matrix of the type (50000x4096) and feed this matrix to t-SNE.
If you use other network networks like ResNet then CNN-code is probably conv5_3 with 2048 dimensions (maybe you need to flatten the tensor 1x1x2048 to a vector 2048). And again for all those 50,000 images forward propagate and store their CNN-codes. You will get a matrix of the shape (50000x2048).
Regards
ML