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

Commit

Permalink
Add 4D example
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeep-krishnamurthy committed Jan 28, 2019
1 parent 2fc6076 commit 5ccb8b9
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions src/operator/image/image_random.cc
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,34 @@ NNVM_REGISTER_OP(_image_normalize)
[-1.208275 -1.1878313 ]
[-1.4711051 -1.5200229 ]]]
<NDArray 3x4x2 @cpu(0)>
image = mx.nd.random.uniform(0, 1, (2, 3, 4, 2))
normalize(image, mean=(0, 1, 2), std=(3, 2, 1))
[[[[ 0.18934818 0.13092826]
[ 0.3085322 0.27869293]
[ 0.02367868 0.11246539]
[ 0.0290431 0.2160573 ]]
[[-0.4898908 -0.31587923]
[-0.08369008 -0.02142242]
[-0.11092162 -0.42982462]
[-0.06499392 -0.06495637]]
[[-1.0213816 -1.526392 ]
[-1.2008414 -1.1990893 ]
[-1.5385206 -1.4795225 ]
[-1.2194707 -1.3211205 ]]]
[[[ 0.03942481 0.24021089]
[ 0.21330701 0.1940066 ]
[ 0.04778443 0.17912441]
[ 0.31488964 0.25287187]]
[[-0.23907584 -0.4470462 ]
[-0.29266903 -0.2631998 ]
[-0.3677222 -0.40683383]
[-0.11288315 -0.13154092]]
[[-1.5438497 -1.7834496 ]
[-1.431566 -1.8647819 ]
[-1.9812102 -1.675859 ]
[-1.3823645 -1.8503251 ]]]]
<NDArray 2x3x4x2 @cpu(0)>
)code" ADD_FILELINE)
.set_attr_parser(ParamParser<NormalizeParam>)
.set_num_inputs(1)
Expand Down

0 comments on commit 5ccb8b9

Please sign in to comment.