Closed lgarithm closed 5 years ago
We need to introduce the concept of inplace operator. An operator can be used as inplace operator if the shape of its output tensors equals one of its input tensors.
This should be done when compiling a symbolic model to physical model.
supported by https://github.com/lgarithm/stdnn-ops/pull/1
Currently the operation
where
a
is the activation function, requires 3 steps to compute, but we can combine them into 1 or 2 steps.For training, we need two steps:
f(x) = a(g(x))
whereg
is an affine operator.For inference, we only need one step.