This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
piiswrong
reviewed
May 8, 2018
{'ctx': mx.cpu(0), 'act_data': shape, 'type_dict': {'act_data': np.float64}}, | ||
{'ctx': mx.cpu(0), 'act_data': shape, 'type_dict': {'act_data': np.float32}}, | ||
{'ctx': mx.cpu(0), 'act_data': shape, 'type_dict': {'act_data': np.float16}}] | ||
check_consistency(sym, ctx_list) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we need to add gradient tests
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good point. I didn't know it doesn't check grad
eric-haibin-lin
changed the title
[MXNET-408] [WIP] inplace ReLU activation
[MXNET-408] inplace ReLU activation
May 8, 2018
This was referenced May 8, 2018
jinhuang415
pushed a commit
to jinhuang415/incubator-mxnet
that referenced
this pull request
May 29, 2018
* inplace version of activation(relu) * inplace relu * add comments * add commnet * comments * fix compilation error * add check_numerical_grad test
rahul003
pushed a commit
to rahul003/mxnet
that referenced
this pull request
Jun 4, 2018
* inplace version of activation(relu) * inplace relu * add comments * add commnet * comments * fix compilation error * add check_numerical_grad test
eric-haibin-lin
added a commit
to eric-haibin-lin/mxnet
that referenced
this pull request
Jun 4, 2018
* inplace version of activation(relu) * inplace relu * add comments * add commnet * comments * fix compilation error * add check_numerical_grad test
anirudh2290
pushed a commit
that referenced
this pull request
Jun 11, 2018
* inplace version of activation(relu) * inplace relu * add comments * add commnet * comments * fix compilation error * add check_numerical_grad test
zheng-da
pushed a commit
to zheng-da/incubator-mxnet
that referenced
this pull request
Jun 28, 2018
* inplace version of activation(relu) * inplace relu * add comments * add commnet * comments * fix compilation error * add check_numerical_grad test
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
For
y = relu(x)
, this PR calculates dx based on (dy, y) instead of (dy, x) which enables inplace operation duringy = relu(x)
(i.e. y and x shares the same memory).Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
Before:
Batch size = 120, Memory = 11249 MB
After:
Batch size = 120, Memory = 7856 MB
Batch size = 190, Memory = 11250 MB
For
train_imagenet.py --network resnet --benchmark 1 --gpus=0 --batch-size=xx
with kvstore=None, max batch size increased from 88 to 128.CUDNN7, CUDA 9, K80.