Skip to content

Instantly share code, notes, and snippets.

@rachtsingh
rachtsingh / baseline.log
Created December 30, 2016 03:25
Baseline log
Loading data from 'data/small-train.t7'...
* vocabulary size: source = 50004; target = 50004
* additional features: source = 0; target = 0
* maximum sequence length: source = 50; target = 51
* number of training sentences: 100000
* maximum batch size: 64
Building model...
* using input feeding
Initializing parameters...
* number of parameters: 84814004
@rachtsingh
rachtsingh / batch_norm.log
Last active December 30, 2016 07:38
seq2seq with batch normalization enabled
Loading data from 'data/small-train.t7'...
* vocabulary size: source = 50004; target = 50004
* additional features: source = 0; target = 0
* maximum sequence length: source = 50; target = 51
* number of training sentences: 100000
* maximum batch size: 64
Building model...
* using input feeding
Initializing parameters...
* number of parameters: 84834004
@rachtsingh
rachtsingh / layer_norm.log
Created December 30, 2016 19:38
seq2seq with layer normalization enabled
Loading data from 'data/small-train.t7'...
* vocabulary size: source = 50004; target = 50004
* additional features: source = 0; target = 0
* maximum sequence length: source = 50; target = 51
* number of training sentences: 100000
* maximum batch size: 64
Building model...
* using input feeding
Initializing parameters...
* number of parameters: 84818004
@rachtsingh
rachtsingh / batch_norm_no_opt.log
Created January 1, 2017 06:22
Batch norm with no memory optimization on the nn.BatchNormalization modules
Loading data from 'data/small-train.t7'...
* vocabulary size: source = 50004; target = 50004
* additional features: source = 0; target = 0
* maximum sequence length: source = 50; target = 51
* number of training sentences: 100000
* maximum batch size: 64
Building model...
* using input feeding
Initializing parameters...
* number of parameters: 84834004
[01/30/17 12:34:39 INFO] Using GPU(s): 1
[01/30/17 12:34:39 INFO] Loading data from '../data/translate-train.t7'...
[01/30/17 12:34:44 INFO] * vocabulary size: source = 50004; target = 50004
[01/30/17 12:34:44 INFO] * additional features: source = 0; target = 0
[01/30/17 12:34:44 INFO] * maximum sequence length: source = 50; target = 51
[01/30/17 12:34:44 INFO] * number of training sentences: 100000
[01/30/17 12:34:44 INFO] * maximum batch size: 64
[01/30/17 12:34:44 INFO] Building model...
[01/30/17 12:34:48 INFO] * using input feeding
[01/30/17 12:34:48 INFO] Initializing parameters...
[01/30/17 13:57:47 INFO] Using GPU(s): 1
[01/30/17 13:57:47 INFO] Loading data from '../data/translate-train.t7'...
[01/30/17 13:57:51 INFO] * vocabulary size: source = 50004; target = 50004
[01/30/17 13:57:51 INFO] * additional features: source = 0; target = 0
[01/30/17 13:57:51 INFO] * maximum sequence length: source = 50; target = 51
[01/30/17 13:57:51 INFO] * number of training sentences: 100000
[01/30/17 13:57:51 INFO] * maximum batch size: 64
[01/30/17 13:57:51 INFO] Building model...
[01/30/17 13:57:55 INFO] * using input feeding
[01/30/17 13:57:56 INFO] Initializing parameters...

Keybase proof

I hereby claim:

  • I am rachtsingh on github.
  • I am rachitsingh (https://keybase.io/rachitsingh) on keybase.
  • I have a public key ASAtaQuPwR-0aYEy7PkgjheFZh-b4C2ZfWG7ssWrHRDi8Qo

To claim this, I am signing this object:

@rachtsingh
rachtsingh / Distributions.cu
Created January 18, 2018 18:02
Distributions.cu
#include "ATen/NativeFunctions.h"
#include "ATen/Dispatch.h"
#include "ATen/cuda/CUDAApplyUtils.cuh"
#include <curand.h>
#include <curand_kernel.h>
#include <curand_philox4x32_x.h>
#include <utility>
#include <functional>
#include <nvfunctional>
import numpy as np
from matplotlib import pyplot as plt
def sample_gamma(alpha):
total = 0
scale = 1.
if (alpha < 1.0):
scale *= (1 - np.random.uniform() ** (1.0 / alpha))
total += 1
@rachtsingh
rachtsingh / stack.c
Created September 15, 2018 22:14
Trying to use stack memory after it's gone
#include <stdio.h>
// void * return type means that it returns a naked pointer, which is just an address.
void *foo(void) {
long bar = 5;
printf("bar's address is: %p, holds %ld bytes\n", &bar, sizeof(long));
long *ret = &bar;
return (void *) ret; // ret is a pointer to a long, but we just turn it into a regular address
// note that the previous line doesn't *do* anything, it just gets the compiler off our back
}