@sandeep-krishnamurthy I am not sure whether this should be implemented in the 
backend. It needs to be based on several other operators, as it would be 
complicated and inefficient to directly forward and backward as a whole 
(especially backward). The `HybridBlock` in my opinion would be a good place to 
hold the implementation, but there are two problems:
1. Firstly, implementing a `HybridBlock` would make the code 
language-dependent, which means supporting these many languages would be 
error-prone and labour-intensive.
2. Secondly, this might violate the definition of a `Block` a little bit, 
because the doc tells us `Block` is the 'base class for neural network layers 
and models', whose subclasses are mostly in the `gluon.nn` package. `einsum` of 
course may or may not fit into this, as I believe it is somewhat ambiguous what 
'neural network layer' actually means, and there is hardly any difference 
between a 'neural network layer' and an operator, especially a complex one 
(whether parameterized or not does not help, because many layers in `gluon.nn` 
have no parameters, and some layers are even simple capsulation of the 
corresponding operators).

Could you point to me where I should work if I need to use other operators? Or, 
alternatively, is there a way of storing temporary data in forward for use in 
backward? Thanks!

[ Full content available at: 
https://github.com/apache/incubator-mxnet/issues/10840 ]
This message was relayed via gitbox.apache.org for [email protected]

Reply via email to