-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@mxnet-label-bot add [Visualization, pr-awaiting-review] |
Test for plot network has been disabled in the code
|
python/mxnet/visualization.py
Outdated
@@ -339,11 +339,17 @@ def looks_like_weight(name): | |||
elif op == "BatchNorm": | |||
attr["fillcolor"] = cm[3] | |||
elif op in ('Activation', 'LeakyReLU'): | |||
label = r"%s\n%s" % (op, node["attrs"]["act_type"]) | |||
if op == "LeakyReLU": |
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.
if special handling is needed for each case, then the outer elif op in ...
is not necessary.
python/mxnet/visualization.py
Outdated
act_type = attrs.get("act_type", "Leaky") if attrs else "Leaky" | ||
else: | ||
act_type = node["attrs"]["act_type"] | ||
label = r"%s\n%s" % (op, str(act_type)) |
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.
this usage is being deprecated. use string.format instead.
@szha All review comments addressed. Details of tests are in the PR description |
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.
Thanks for your contribution! LGTM: )
The PR has been merged. Thank you again! : ) |
* Check for kernel in Pooling * Fix Leakyrelu visualization * Address review comments * Change all occurences to string format * Fix lint error
* Check for kernel in Pooling * Fix Leakyrelu visualization * Address review comments * Change all occurences to string format * Fix lint error
* Check for kernel in Pooling * Fix Leakyrelu visualization * Address review comments * Change all occurences to string format * Fix lint error
Description
Fixes #14245
Fixes #10416
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.
Changes
Comments
Test code for Pooling visualization crash (after fix):
Test code for LeakyRelu visualization crash (after fix):
Test after changing to str.format:
Change in print_summary tested with