Package pylearn :: Package examples :: Module theano_update
[hide private]

Module theano_update

source code

Variables [hide private]
  a = tensor.scalar()
  b = tensor.scalar()
  c = a* b
  fprop = theano.function([a, b], [c])
  a_val = numpy.array(12.)
  new_b = b+ 1
  update = theano.function([b], [new_b])
  re_new_b = tensor.add_inplace(b, 1.)
  re_update = theano.function([b], [re_new_b])
  b_val = re_update(b_val)
  c_val = fprop(a_val, b_val)

Imports: theano, tensor, numpy