Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What does 'no_inplace' mean in theano?

Tags:

theano

Here is the code:

>>> a = T.dscalar("a")
>>> b = a+2
>>> b

and the output is

Elemwise{add,no_inplace}.0

add shows that the apply node has the add as the operation.

But what does no_inplace mean? and why we have a ".0" at the end of the output?

like image 367
Abhishek Avatar asked Sep 30 '22 01:09

Abhishek


1 Answers

Inplace computations are computations that destroy their inputs as a side-effect. For example, if you iterate over a matrix and double every element, this is an inplace operation because when you are done, the original input has been overwritten. Ops representing inplace computations are destructive, and by default these can only be inserted by optimizations, not user code.

So no_inplace is just the opposite.

From http://deeplearning.net/software/theano/glossary.html#glossary

like image 161
Abhishek Avatar answered Oct 12 '22 10:10

Abhishek