ptrendx commented on a change in pull request #15118: Conversion from FP32 
model to Mixed Precision model
URL: https://github.com/apache/incubator-mxnet/pull/15118#discussion_r291413457
 
 

 ##########
 File path: docs/tutorials/amp/amp_tutorial.md
 ##########
 @@ -249,6 +251,46 @@ for epoch in range(1):
 
 We got 60% speed increase from 3 additional lines of code!
 
+## Inference with AMP
+
+To do inference with mixed precision for a trained model in FP32, you can use 
the conversion APIs: `amp.convert_model` for symbolic model and 
`amp.convert_hybrid_block` for gluon models. The conversion APIs will take the 
FP32 model as input and will return a mixed precision model, which can be used 
to run inference. Below, we demonstrate for a gluon model and a symbolic model: 
1. Conversion from FP32 model to mixed precision model 2. Run inference on the 
mixed precision model.
+
+```python
+with mx.Context(mx.gpu(0)):
 
 Review comment:
   Maybe do
   ```suggestion
   with ctx = mx.Context(mx.gpu(0)):
   ```
   and then use this `ctx` instead of `mx.gpu()`?

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


With regards,
Apache Git Services

Reply via email to