Blocked to use the TSNE CUDA library on Google Colab ? You’ ll find here a step by step tutorial to use it !
It took me a long time to find out how to use TSNE CUDA on Colab.
And often it just takes a little line of code that will work like magic.
For TSNE Cuda, you will find the solution in this article !
First of all, let’s install the tsnecuda library:
!pip install tsnecuda
Next, we will need to use conda for this tutorial !
The installation on Google Colab is singular. It has been detailed in this article.
The code itself :
!pip install -q condacolab import condacolab condacolab.install()
Finally we install the dependencies to tsnecuda :
!wget https://anaconda.org/CannyLab/tsnecuda/2.1.0/download/linux-64/tsnecuda-2.1.0-cuda101.tar.bz2 !tar xvjf tsnecuda-2.1.0-cuda101.tar.bz2 !cp -r site-packages/* /usr/local/lib/python3.7/dist-packages/
Thanks to them we avoid the redundant error: ‘ImportError: libcublas.so.9.0’.
Finally, a last dependency allows us to use cuda with tsnecuda :
!conda install --offline tsnecuda-2.1.0-cuda101.tar.bz2
And voilà ! We’re now…
… Ready to use TSNE CUDA on Colab !
Just import the tsnecuda library:
Then test if it works with this short code :
from tsnecuda import TSNE as TSNE_CUDA tsne_cuda = TSNE_CUDA(n_components=2, verbose=0)
Didn’t get any error ? Congratulations ! You’re good to create your own TSNE schemas !
By the way, we will describe in a future article a concrete use case for TSNE sentences visualization.
Still having troubles even after this tutorial ? Feel free to share about it in the comments, we regularly update our articles 😉
One last word, if you want to go further and learn about Deep Learning - I've prepared for you the Action plan to Master Neural networks. for you.
7 days of free advice from an Artificial Intelligence engineer to learn how to master neural networks from scratch:
- Plan your training
- Structure your projects
- Develop your Artificial Intelligence algorithms
I have based this program on scientific facts, on approaches proven by researchers, but also on my own techniques, which I have devised as I have gained experience in the field of Deep Learning.
To access it, click here :