(sweet guitar solo) In the throes of the ruby red river that flows through the darkening concrete devouring ghosts that float by, I'm with them. Up in the current and taken in whole, I've been struggling, strangling, others in tow. Have my eyes gone missing?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json = require 'cjson' | |
function buildNcduLayer(name, module) | |
local result = nil | |
if torch.isTensor(module) then | |
if module:numel() ~= 0 then | |
local strt = {name..': [' .. torch.typename(module) .. ' of size '} | |
for i=1,module:nDimension() do | |
table.insert(strt, module:size(i)) | |
if i ~= module:nDimension() then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
json = require 'cjson' | |
function buildNcduLayer(name, module) | |
local result = nil | |
if torch.isTensor(module) then | |
if module:numel() ~= 0 then | |
local strt = {name..': [' .. torch.typename(module) .. ' of size '} | |
for i=1,module:nDimension() do | |
table.insert(strt, module:size(i)) | |
if i ~= module:nDimension() then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
th> x = torch.randn(3,3) | |
[0.0001s] | |
th> x | |
-0.9764 1.3443 0.4054 | |
1.7598 1.9367 -0.6121 | |
-0.1593 -0.0788 -0.2321 | |
[torch.DoubleTensor of size 3x3] | |
[0.0002s] | |
th> x:mean(1) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
from IPython.parallel.client import client | |
import argparse | |
import sys | |
import numpy as np | |
import datetime | |
import time | |
REDBULLET = u"\x1b[1;31m\u25cf\x1b[0m".encode('utf-8') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
------- AlexNet: Using my own weight initialization | |
model = nn.Sequential() | |
model:add(cudnn.SpatialConvolution(3,96,11,11,4,4,2,2)) | |
model.modules[#model.modules].weight:normal(0, 0.01) | |
model.modules[#model.modules].bias:fill(0) | |
model:add(cudnn.ReLU()) | |
model:add(inn.SpatialCrossResponseNormalization(5, 0.0001, 0.75, 1)) | |
model:add(nn.SpatialMaxPooling(3,3,2,2)) | |
model:add(cudnn.SpatialConvolution(96,256,5,5,1,1,2,2)) | |
model.modules[#model.modules].weight:normal(0, 0.01) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import gzip | |
import re | |
def load_all_movies(filename): | |
""" | |
Load and parse 'plot.list.gz'. Yields each consecutive movie as a dictionary: | |
{"title": "The movie's title", | |
"year": The decade of the movie, like 1950 or 1980, | |
"identifier": Full key of IMDB's text string, | |
"summary": "The movie's plot summary" | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Based on scitools meshgrid | |
def meshgrid(*xi, **kwargs): | |
""" | |
Return coordinate matrices from coordinate vectors. | |
Make N-D coordinate arrays for vectorized evaluations of | |
N-D scalar/vector fields over N-D grids, given | |
one-dimensional coordinate arrays x1, x2,..., xn. | |
.. versionchanged:: 1.9 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"metadata": { | |
"name": "", | |
"signature": "sha256:78d15dad8876f550bbf2e9f489381146f98b271e5ec4e609219ad11ddaa39658" | |
}, | |
"nbformat": 3, | |
"nbformat_minor": 0, | |
"worksheets": [ | |
{ | |
"cells": [ |