kohillyang commented on issue #18902:
URL: 
https://github.com/apache/incubator-mxnet/issues/18902#issuecomment-679441768


   I found the reason is that amp.init should be called before the creation of 
the network, because it will patch some functions in the namespaces of mx.nd 
and mx.sym. And since the functions have already been patched, the network does 
not need to cast to float16. 
   
   However, in 
<https://github.com/dmlc/gluon-cv/blob/e3513064244f3f987f699ac43781d40ad01e144a/scripts/detection/faster_rcnn/train_faster_rcnn.py#L655>,
 the network is cast to float16 when using amp, so I 'm not sure whether the 
casting is needed.


----------------------------------------------------------------
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]


Reply via email to