added support for large tensors for Dropout operator and tests to verify support for more operators#16409
Conversation
11b23b2 to
083c6b5
Compare
|
@mxnet-label-bot add [pr-awaiting-review] |
|
@anirudh2290 @ChaiBapchya @zheng-da this PR is ready for review |
|
test_large_array.test_gluon_embedding ... ok ok test_large_array.test_softmax ... ok test_large_array.test_sequence_mask ... ok test_large_array.test_dropout ... ok |
083c6b5 to
b80b3a3
Compare
| def npy_instance_norm(data, gamma, beta, axis, eps=1E-5): | ||
| if axis < 0: | ||
| axis += data.ndim | ||
| broadcast_shape = [1 for _ in range(data.ndim)] | ||
| broadcast_shape[axis] = data.shape[axis] | ||
| mean = data.mean(axis=axis, keepdims=True).astype(dtype) | ||
| var = data.var(axis=axis, keepdims=True).astype(dtype) | ||
| std = np.sqrt(var + dtype(eps)).astype(dtype) | ||
| out = gamma * (data - mean) / std + \ | ||
| beta | ||
| return out |
There was a problem hiding this comment.
Documentation explaining operator: https://beta.mxnet.io/api/ndarray/_autogen/mxnet.ndarray.InstanceNorm.html
b80b3a3 to
001c6a5
Compare
|
|
anirudh2290
left a comment
There was a problem hiding this comment.
is there a comma missing in the title ?
1 . added support for large tensors in Dropout
2. tests to verify support for more operators ?
|
@sxjscience @apeforest @anirudh2290 @zheng-da @pengzhao-intel This PR is ready for review |
Aah, corrected it now. Thanks for pointing that out. |
001c6a5 to
3cabe84
Compare
anirudh2290
left a comment
There was a problem hiding this comment.
LGTM, please add the TODO.
3cabe84 to
1f8686e
Compare
|
@mxnet-label-bot add [pr-awaiting-merge] |
Description
Tests added for following operators:
astype
cast
repeat
ceil
fix
floor
rint
round
trunk
arccos
arcsin
arctan
cos
degrees
radians
sin
tan
L2Normalization
InstanceNormalization
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Testing
Will update results of test run here.