t-SNE accelerated with PyTorch
Project description
t-SNE pytorch Implementation with CUDA
CUDA-accelerated PyTorch implementation of the t-stochastic neighbor embedding algorithm described in Visualizing Data using t-SNE.
Installation
Requires Python 3.7
Install via Pip
pip3 install tsne-torch
Install from Source
git clone https://github.com/palle-k/tsne-pytorch.git
cd tsne-pytorch
python3 setup.py install
Usage
from tsne_torch import TorchTSNE as TSNE
X = ... # 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)
Command-Line Usage
python3 -m tsne_torch --xfile <path> --yfile <path>
Example
This is our result compare to result of python implementation.
- PyTorch result
- python result
Credit
This code highly inspired by
- author's python implementation code here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tsne-torch-1.0.1.tar.gz
(5.3 kB
view details)
File details
Details for the file tsne-torch-1.0.1.tar.gz
.
File metadata
- Download URL: tsne-torch-1.0.1.tar.gz
- Upload date:
- Size: 5.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.23.0 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be65407c689a93f8dabff43da393e18fef5ea3bbd4f4119b90dcdf13fc5e4440 |
|
MD5 | 498666b4ca171a4ee782889390db7727 |
|
BLAKE2b-256 | 185b8353fd7baad6e55c21f71f2a068e47ac96dc032e58412a87276c39bb3868 |