Skip to content

Instantly share code, notes, and snippets.

@nlkim0817
nlkim0817 / conv3dnet.py
Created April 4, 2017 10:19 — forked from dansileshi/conv3dnet.py
Example of 3D convolutional network with TensorFlow
import tensorflow as tf
import numpy as np
FC_SIZE = 1024
DTYPE = tf.float32
def _weight_variable(name, shape):
return tf.get_variable(name, shape, DTYPE, tf.truncated_normal_initializer(stddev=0.1))
# install dependencies
sudo apt-get update
sudo apt-get install -y build-essential
sudo apt-get install -y cmake
sudo apt-get install -y libgtk2.0-dev
sudo apt-get install -y pkg-config
sudo apt-get install -y python-numpy python-dev
sudo apt-get install -y libavcodec-dev libavformat-dev libswscale-dev
sudo apt-get install -y libjpeg-dev libpng-dev libtiff-dev libjasper-dev

Build tensorflow on OSX with NVIDIA CUDA support (GPU acceleration)

These instructions are based on Mistobaan's gist but expanded and updated to work with the latest tensorflow OSX CUDA PR.

Requirements

OS X 10.10 (Yosemite) or newer

@nlkim0817
nlkim0817 / adversarial_1d.py
Created May 8, 2016 17:59 — forked from rocknrollnerd/adversarial_1d.py
A simple adversarial network in Theano+Lasagne trying to estimate a 1d normal distribution
import matplotlib.pyplot as plt
import numpy as np
import lasagne
import theano
import theano.tensor as T
from lasagne.nonlinearities import rectify, sigmoid, linear, tanh
from scipy.stats import norm
import seaborn as sns
# with the huge help of http://evjang.com/articles/genadv1