Tutorial by Examples

scan is used for calling function multiple times over a list of values, the function may contain state. scan syntax (as of theano 0.9): scan( fn, sequences=None, outputs_info=None, non_sequences=None, n_steps=None, truncate_gradient=-1, go_backwards=False, m...
theano.map and theano.scan_module.reduce are wrappers of theano_scan. They can be seen as handicapped version of scan. You can view Basic scan usage section for reference. import theano import theano.tensor as T s_x = T.ivector() s_sqr, _ = theano.map( fn = lambda x:x*x, sequences = [s...
As of theano 0.9, while loops can be done via theano.scan_module.scan_utils.until. To use, you should return until object in fn of scan. In the following example, we build a function that checks whether a complex number is inside Mandelbrot set. A complex number z_0 is inside mandelbrot set if ser...

Page 1 of 1