These instructions were adapted from here.
The following was tested on the hive machines (e.g. hive10.cs.berkeley.edu
).
Download and install cuDNN.
Configure IP address in Windows XP | |
Start | |
Settings | |
Network Connections | |
Local Area Connections | |
Properties | |
Internet Protocol (TCP/IP) | |
Properties | |
IP address: 10.0.0.2 | |
Subnet mask: 255.255.255.0 |
These instructions were adapted from here.
The following was tested on the hive machines (e.g. hive10.cs.berkeley.edu
).
Download and install cuDNN.
import numpy as np | |
import theano | |
import theano.tensor as T | |
import lasagne.layers as L | |
class LocallyConnected2DLayer(L.Conv2DLayer): | |
"""Similar to Conv2DLayer except that the filter weights are unshared | |
This implementation computes the output tensor by iterating over the filter |
import numpy as np | |
import tensorflow as tf | |
from video_prediction.ops import pad2d_paddings, conv2d, deconv2d, upsample2d, upsample_conv2d, pool2d, conv_pool2d | |
def test_upsample_conv2d(): | |
sess = tf.Session() | |
batch = 16 | |
for strides in ([2, 2], [3, 4]): |
import matplotlib.pyplot as plt | |
import numpy as np | |
def vis_square(data, grid_shape=None, padsize=1, padval=0, cmap=None, data_min=None, data_max=None): | |
data_min = data_min if data_min is not None else data.min() | |
data_max = data_max if data_max is not None else data.max() | |
data = (data - data_min) / (data_max - data_min) | |
lead_shape = data.shape[:-3] |
import tensorflow as tf | |
from tensorflow.python.util import nest | |
def _with_flat_batch(flat_batch_fn): | |
def fn(x, *args, **kwargs): | |
shape = tf.shape(x) | |
flat_batch_x = tf.reshape(x, tf.concat([[-1], shape[-3:]], axis=0)) | |
flat_batch_r = flat_batch_fn(flat_batch_x, *args, **kwargs) | |
r = nest.map_structure(lambda x: tf.reshape(x, tf.concat([shape[:-3], x.shape[1:]], axis=0)), |
Tested on Ubuntu 14.04.
Install desired version of python 3 (e.g. 3.5.1). Make sure to use the --enable-shared
flag to generate python shared libraries, which will later be linked to.
env PYTHON_CONFIGURE_OPTS="--enable-shared" pyenv install 3.5.1
import numpy as np | |
import time | |
import cv2 | |
from direct.showbase.ShowBase import ShowBase | |
from panda3d.core import FrameBufferProperties, WindowProperties | |
from panda3d.core import GraphicsPipe, GraphicsOutput | |
from panda3d.core import Texture | |
from panda3d.core import loadPrcFileData | |
loadPrcFileData('', 'show-frame-rate-meter true') |
import os | |
import numpy as np | |
def save_gif(gif_fname, images, fps=4): | |
""" | |
To generate a gif from image files, first generate palette from images | |
and then generate the gif from the images and the palette. | |
ffmpeg -i input_%02d.jpg -vf palettegen -y palette.png |