Open Vummal opened 6 months ago
Hello and thanks for reading the paper.
from sklearn.manifold import TSNE import seaborn as sns
latent_dim = 512 embeddings = [] classes = []
for img, class in dataloader: embeddings.append(encoder(img)) classes.append(class)
embeddings = [emb.cpu().numpy().reshape(latent_dim) for emb in embeddings]
reducer = TSNE(n_components=2, perplexity=30, learning_rate=200, n_iter=1000, random_state=42)
embedding = reducer.fit_transform(embeddings)
sns.scatterplot(x=embedding[:,0], y=embedding[:,1], hue=classes, palette="deep") plt.title('TSNE Embedding') plt.show()
Thanks for sharing! I will try it.
Hi,
I have read your paper. I am interested in your t-SNE image. Is it possible to share the code to get it or the way to get it? You will be very appreciated. Thanks a lot.