symbolic-pymc
symbolic-pymc copied to clipboard
Implement math operators for meta tensors
As a convenience, we should provide meta tensor implementations of the following:
__add__, __radd__, __sub__, __rsub__, __mul__, __rmul__, __div__, __rdiv__, __truediv__, __rtruediv__, __floordiv__, __rfloordiv__, __mod__, __rmod__, __lt__, __le__, __gt__, __ge__, __and__, __rand__, __or__, __ror__, __xor__, __rxor__, __getitem__, __pow__, __rpow__, __invert__, __neg__, __abs__, __matmul__, __rmatmul__.
Looks like some of these are specified for tf.Tensor in tensorflow.python.ops.math_ops.
The most basic algebraic operators (e.g. __[r]add__, __[r]sub__, etc.) have been added to the TensorFlow meta tensor class in #79. The same needs to be done for Theano, along with the other, non-algebraic operators in TensorFlow.