You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by gi...@git.apache.org on 2017/10/10 00:08:16 UTC

[GitHub] leezu commented on issue #8182: Make gluon.Block cooperative in multiple inheritance setting

leezu commented on issue #8182: Make gluon.Block cooperative in multiple inheritance setting
URL: https://github.com/apache/incubator-mxnet/pull/8182#issuecomment-335322212
 
 
   If the user doesn't use multiple inheritance, i.e. just `class Net(gluon.Block)` an exception will be raised if unknown parameters are passed. That is because Block inherits from `object`, passes these unknown parameters to the `object.__init__`, which will then raise an Exception. So the behaviour is essentially equivalent to the current implementation.
   
   Consider however `class Net(gluon.Block, someOtherClass)`. Then the `super().__init__` call actually calls `someOtherClass.__init__`, so the behaviour depends on `someOtherClass`. But that is exactly what this PR is trying to achieve 
 
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services