You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by zh...@apache.org on 2019/07/05 18:09:03 UTC

[incubator-mxnet] branch master updated: Update fp16 docs: Block.cast is inplace (#15458)

This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
     new dfe923a  Update fp16 docs: Block.cast is inplace (#15458)
dfe923a is described below

commit dfe923ac254be93ae0a580bfd26b52fb6ea065e8
Author: Serge Panev <sp...@nvidia.com>
AuthorDate: Sat Jul 6 03:08:33 2019 +0900

    Update fp16 docs: Block.cast is inplace (#15458)
    
    Signed-off-by: Serge Panev <sp...@nvidia.com>
---
 docs/faq/float16.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/docs/faq/float16.md b/docs/faq/float16.md
index 4656686..22d4ef4 100644
--- a/docs/faq/float16.md
+++ b/docs/faq/float16.md
@@ -42,7 +42,7 @@ With Gluon API, you need to take care of three things to convert a model to supp
 1. Cast Gluon `Block`'s parameters and expected input type to float16 by calling the [cast](https://mxnet.incubator.apache.org/api/python/gluon/gluon.html#mxnet.gluon.Block.cast) method of the `Block` representing the network.
 
 ```python
-net = net.cast('float16')
+net.cast('float16')
 ```
 
 2. Ensure the data input to the network is of float16 type. If your `DataLoader` or `Iterator` produces output in another datatype, then you would have to cast your data. There are different ways you can do this. The easiest would be to use the [astype](https://mxnet.incubator.apache.org/api/python/ndarray/ndarray.html#mxnet.ndarray.NDArray.astype) method of NDArrays.