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
| 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 |
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
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 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 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 |
This was tested on a ThinkPad P70 laptop with an Intel integrated graphics and an NVIDIA GPU:
lspci | egrep 'VGA|3D'
00:02.0 VGA compatible controller: Intel Corporation Device 191b (rev 06)
01:00.0 VGA compatible controller: NVIDIA Corporation GM204GLM [Quadro M3000M] (rev a1)
A reason to use the integrated graphics for display is if installing the NVIDIA drivers causes the display to stop working properly.
In my case, Ubuntu would get stuck in a login loop after installing the NVIDIA drivers.
This happened regardless if I installed the drivers from the "Additional Drivers" tab in "System Settings" or the ppa:graphics-drivers/ppa in the command-line.
| 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 |
| 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)), |
| 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]): |