You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2017/12/21 19:09:48 UTC
[GitHub] reminisce commented on issue #9160: How to convert data in range -m to +n to data in range 0 to1? Is there are any python API
reminisce commented on issue #9160: How to convert data in range -m to +n to data in range 0 to1? Is there are any python API
URL: https://github.com/apache/incubator-mxnet/issues/9160#issuecomment-353432704
Just use element-wise ops. Suppose `x` is the tensor you want to convert, and the data range is `[-m, n]`, define
```python
y = x / (m + n) + m / (m + n)
```
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services