forked frommxl1990/tsne-pytorch
- Notifications
You must be signed in to change notification settings - Fork5
CUDA-accelerated PyTorch implementation of t-SNE
License
NotificationsYou must be signed in to change notification settings
palle-k/tsne-pytorch
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
PyTorch implementation of the t-stochastic neighbor embedding algorithm described inVisualizing Data using t-SNE.
While CUDA support is not required for this library, the best performance can be achieved when this library is used on a system with CUDA support.
Requires Python 3.7 or later
pip3 install tsne-torch
git clone https://github.com/palle-k/tsne-pytorch.gitcd tsne-pytorchpython3 setup.py install
fromtsne_torchimportTorchTSNEasTSNEX= ...# shape (n_samples, d)X_emb=TSNE(n_components=2,perplexity=30,n_iter=1000,verbose=True).fit_transform(X)# returns shape (n_samples, 2)
python3 -m tsne_torch --xfile<path> --yfile<path>
This is our result compared to the result of the author's Python implementation on a subset of the MNIST dataset:
- PyTorch result
- python result
This code highly inspired by
- author's python implementation codehere.
About
CUDA-accelerated PyTorch implementation of t-SNE
Topics
Resources
License
Stars
Watchers
Forks
Languages
- Python100.0%