Skip to content

Instantly share code, notes, and snippets.

💭
Work in progress ...

Krzysztof Sopyła ksopyla

View GitHub Profile
@ksopyla
ksopyla / TorchText_load_IMDB.py
Last active Apr 2, 2019
How to load text to neural network using TorchText
View TorchText_load_IMDB.py
from torchtext import data
#from torchtext.data import BucketIterator
from torchtext import datasets
def simple_tokinizer(text):
""" Simple tokenizer
"""
return text.split()
@ksopyla
ksopyla / ubuntu16_tensorflow_cuda8.sh
Last active Feb 24, 2019
How to set up tensorflow with CUDA 8 cuDNN 5.1 in virtualenv with Python 3.5 on Ubuntu 16.04 http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
View ubuntu16_tensorflow_cuda8.sh
# This is shorthened version of blog post
# http://ksopyla.com/2017/02/tensorflow-gpu-virtualenv-python3/
# update packages
sudo apt-get update
sudo apt-get upgrade
#Add the ppa repo for NVIDIA graphics driver
sudo add-apt-repository ppa:graphics-drivers/ppa
sudo apt-get update
@ksopyla
ksopyla / cuda_toolkit_8.0_rc_update_gcc.sh
Created Sep 6, 2016
Update gcc and g++ for cuda toolkit 8.0 RC installation
View cuda_toolkit_8.0_rc_update_gcc.sh
sudo apt-get install gcc-4.9
sudo apt-get install g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.9 60 --slave /usr/bin/g++ g++ /usr/bin/g++-4.9
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-5 40 --slave /usr/bin/g++ g++ /usr/bin/g++-5
sudo update-alternatives --config gcc
@ksopyla
ksopyla / tensorflow_install.sh
Last active Mar 9, 2017
Tensorflow 0.9 installation procedure on ubuntu 16.04 with CUDA 7.5 and cuDNN v4, blog post describe whole procedure at http://ksopyla.com/2016/07/instalacja-tensorflow-0-9-cuda-7-5-na-ubuntu-16-04
View tensorflow_install.sh
# This is shorthened version of blog post
# http://ksopyla.com/2016/07/instalacja-tensorflow-0-9-cuda-7-5-na-ubuntu-16-04
# upgrade ubuntu 14.04 to 16.04, skip this if you have clean 16.04
sudo apt-get update
sudo apt-get upgrade
sudo do-release-upgrade -d
# check version
lsb_release -a
You can’t perform that action at this time.