Skip to content

Instantly share code, notes, and snippets.

@mjwillson
mjwillson / gist:675cc0259e4291d97104
Created September 7, 2015 17:55 — forked from benanne/gist:1759022
Theano AdvancedSubtensor memory leak
import theano.tensor as T
import theano
import numpy as np
import gc
def freemem():
gc.collect()
gc.collect()
gc.collect()
return theano.sandbox.cuda.cuda_ndarray.cuda_ndarray.mem_info()[0] / 1024**2