samskalicky edited a comment on issue #16187:
URL: 
https://github.com/apache/incubator-mxnet/issues/16187#issuecomment-713724517


   Simple fix seems to be adding `**kwargs` to the `IdentityOPProp` constructor 
like:
   ```
   @mx.operator.register("identityop")
   class IdentityOPProp(mx.operator.CustomOpProp):
       def __init__(self, **kwargs):
           super(IdentityOPProp, self).__init__(True)
           print('IdentityOPProp: %s' % kwargs)
   ```
   Now it works and prints:
   ```
   IdentityOPProp: {'__subgraph_name__': 'cond_else0'}
   
   [[3.]]
   <NDArray 1x1 @cpu(0)>
   
   [[3.]]
   <NDArray 1x1 @cpu(0)>
   ```
   So the question is, how/why is `__subgraph_name__` getting added to this 
op's attributes?


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to