- Instances of
Applyrepresent the application of an Op to some input Variable (or variables) to produce some output Variable (or variables). They are like the application of a [symbolic] mathematical function to some [symbolic] inputs.
Broadcasting is a mechanism which allows tensors with different numbers of dimensions to be used in element-by-element (i.e. element-wise) computations. It works by (virtually) replicating the smaller tensor along the dimensions that it is lacking.
A variable with an immutable value. For example, when you type
>>> x = at.ivector() >>> y = x + 3
constantis created to represent the
3in the graph.
An element-wise operation
fon two tensor variables
Nis one such that:
f(M, N)[i, j] == f(M[i, j], N[i, j])
In other words, each element of an input matrix is combined with the corresponding element of the other(s). There are no dependencies between elements whose
[i, j]coordinates do not correspond, so an element-wise operation is like a scalar operation generalized along several dimensions. Element-wise operations are defined for tensors of different numbers of dimensions by broadcasting the smaller ones. The
Opresponsible for performing element-wise computations is
- See Apply
- Expression Graph¶
A directed, acyclic set of connected Variable and Apply nodes that express symbolic functional relationship between variables. You use Aesara by defining expression graphs, and then compiling them with aesara.function.
An Op is destructive–of particular input(s)–if its computation requires that one or more inputs be overwritten or otherwise invalidated. For example, inplace
Ops are destructive. Destructive
Ops can sometimes be faster than non-destructive alternatives. Aesara encourages users not to put destructive
Ops into graphs that are given to aesara.function, but instead to trust the rewrites to insert destructive
Ops are indicated via a
- see expression graph
- 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 rewrites, not user code.
Linkerinstance responsible for “running” the compiled function. Among other things, the linker determines whether computations are carried out with C or Python code.
Modeinstance specifying an optimizer and a linker that is passed to aesara.function. It parametrizes how an expression graph is converted to a callable object.
.opof an Apply, together with its symbolic inputs fully determines what kind of computation will be carried out for that
Applyat run-time. Mathematical functions such as addition (i.e.
aesara.tensor.add()) and indexing
Ops in Aesara. Much of the library documentation is devoted to describing the various
Ops that are provided with Aesara, but you can add more.
- A function or class that transforms an Aesara graph.
- An instance of a rewriter that has the capacity to provide an improvement to the performance of a graph.
- An Op is pure if it has no destructive side-effects.
- The memory that is used to store the value of a
Variable. In most cases storage is internal to a compiled function, but in some cases (such as constant and shared variable the storage is not internal.
- A Variable whose value may be shared between multiple functions. See
- The interface for Aesara’s compilation from symbolic expression graphs
to callable objects. See
The the main data structure you work with when using Aesara. For example,
>>> x = at.ivector() >>> y = -x**2
Variables, i.e. instances of the
Ops (such as
DimShuffle) can be computed in constant time by simply re-indexing their inputs. The outputs of such
Ops are views because their storage might be aliased to the storage of other variables (the inputs of the
Apply). It is important for Aesara to know which
Variables are views of which other ones in order to introduce Destructive
Ops that are views have their