Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit dfe923a

Browse files
Kh4Lszha
authored andcommitted
Update fp16 docs: Block.cast is inplace (#15458)
Signed-off-by: Serge Panev <[email protected]>
1 parent 728b8db commit dfe923a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/faq/float16.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ With Gluon API, you need to take care of three things to convert a model to supp
4242
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.
4343

4444
```python
45-
net = net.cast('float16')
45+
net.cast('float16')
4646
```
4747

4848
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.

0 commit comments

Comments
 (0)