tornadomeet opened a new issue #9319: repeat run constructor function of 
SymbolBlock when using gluon interface
URL: https://github.com/apache/incubator-mxnet/issues/9319
 
 
   ## Description
   when convert `mx.sym.##op##()` to `SymbolBlock` and run forward() during 
training, i found it will repeat call the constructor function, so if we 
Initialize some variable in the constructor() and change it in forward(), then 
it will be wrong because every time after it changed, it will be Initialized 
again.
   
   give an example here: 
   
https://github.com/luoyetx/mx-lsoftmax/blob/master/operator/lsoftmax-inl.h#L54-L70
   
   `next_beta_` will be assign as `param.beta * 0.1f` every time before 
forward(), so we'll never go into 
https://github.com/luoyetx/mx-lsoftmax/blob/master/operator/lsoftmax-inl.h#L178 
 
   
   when using no gluon interface(original mxnet symbolic interface), it works 
well, but if we changed to gluon(SymbolBlock), then no work.
   
   ## Environment info (Required)
   
   python
   ubuntu16.04
   mxnet-v1.0.1
   
   @piiswrong  @sxjscience 

----------------------------------------------------------------
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:
[email protected]


With regards,
Apache Git Services

Reply via email to