forked from aws/amazon-sagemaker-examples
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding mxnet tests for hook_from_json (aws#143)
* Adding config file for reduce and save_all test scripts * Fixing bug in mxnet reduction util sloved issue aws#142
- Loading branch information
Showing
5 changed files
with
144 additions
and
33 deletions.
There are no files selected for viewing
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
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
56 changes: 56 additions & 0 deletions
56
tests/mxnet/test_json_configs/test_hook_reduce_config_hook.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
{ | ||
"config_name": "my training tornasole config", | ||
"s3_path": "s3://kjndjknd_bucket/prefix", | ||
"local_path": "newlogsRunTest2/test_hook_reduce_config_hook_from_json", | ||
"save_config": "default_save_config", | ||
"reduction_config": "default_reduction_config", | ||
"include_collections" : ["weights", "bias","gradients", "default", "ReluActivation", "flatten"], | ||
"save_all": false, | ||
"collections" : [ | ||
{ | ||
"ReluActivation" : { | ||
"include_regex": ["relu*"], | ||
"save_config": "save_config_collection", | ||
"reduction_config": "reduction_config_for_ReluActivation" | ||
} | ||
}, | ||
{ | ||
"flatten": { | ||
"include_regex": ["flatten*"], | ||
"save_config": "save_config_collection", | ||
"reduction_config": "reduction_config_for_flatten" | ||
} | ||
} | ||
], | ||
"save_configs" : [ | ||
{ | ||
"save_config_collection" : { | ||
"save_steps" : [4,5,6] | ||
} | ||
}, | ||
{ | ||
"default_save_config" : { | ||
"save_steps" : [0,1,2,3] | ||
} | ||
} | ||
], | ||
"reduction_configs" : [ | ||
{ | ||
"reduction_config_for_ReluActivation" :{ | ||
"reductions" : ["min"], | ||
"abs_reductions" : ["max"] | ||
} | ||
}, | ||
{ | ||
"reduction_config_for_flatten" :{ | ||
"norms" : ["l1"], | ||
"abs_norms" : ["l2"] | ||
} | ||
}, | ||
{ | ||
"default_reduction_config": { | ||
"reductions" : ["max", "mean"] | ||
} | ||
} | ||
] | ||
} |
14 changes: 14 additions & 0 deletions
14
tests/mxnet/test_json_configs/test_hook_save_all_hook.json
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
{ | ||
"config_name": "my training tornasole config", | ||
"s3_path": "s3://kjndjknd_bucket/prefix", | ||
"local_path": "newlogsRunTest2/test_hook_save_all_hook_from_json", | ||
"save_config": "default_save_config", | ||
"save_all": true, | ||
"save_configs" : [ | ||
{ | ||
"default_save_config" : { | ||
"save_steps" : [0,1,2,3] | ||
} | ||
} | ||
] | ||
} |
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