Skip to content

Instantly share code, notes, and snippets.

View cbaziotis's full-sized avatar

Christos Baziotis cbaziotis

View GitHub Profile
import torch
import torch.nn as nn
import torch.optim as optim
from torch.autograd import Variable
import torch.nn.functional as F
import matplotlib.pyplot as plt
import numpy as np
@cbaziotis
cbaziotis / ubuntu16_tensorflow_cuda8.sh
Created June 26, 2017 10:34 — forked from ksopyla/ubuntu16_tensorflow_cuda8.sh
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/
# 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
# This is inspired by the fantastic guide https://github.com/saiprashanths/dl-setup
# I have just updated the python-related commands so that everything works in Python 3.
# Tested on Xubuntu 16.04.
# First of all let's update the repos:
sudo apt-get update
# Only if you have a CUDA-compatible Nvidia card, install CUDA.
# Check on the Nvidia website what is the latest driver version which supports your card.
# At the time of this writing it was 367.