-
Notifications
You must be signed in to change notification settings - Fork 24
Provide more appropriate naming for the fourth and fifth arguments of BN #184
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Codecov Report
@@ Coverage Diff @@
## master #184 +/- ##
==========================================
- Coverage 89.49% 89.18% -0.31%
==========================================
Files 24 24
Lines 1361 1350 -11
==========================================
- Hits 1218 1204 -14
- Misses 143 146 +3
Continue to review full report at Codecov.
|
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.
Defer to kusumoto-san and tanaka-san
onnx_chainer/context.py
Outdated
|
||
To be converted as ONNX tensor. | ||
|
||
Return: |
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.
Returns
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.
modified.
@@ -10,34 +10,50 @@ | |||
@support((1, 6, 7)) | |||
def convert_BatchNormalization(func, opset_version, input_names, | |||
output_names, context, parameters): | |||
names = [context.get_name(v.get_variable().array) for v in func.inputs] | |||
if names[1].startswith('param_'): | |||
prefix = names[1][:-6] # remove "_gamma" |
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.
[:-1-len('_gamma')]
?
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.
It seems that this part will be entirely changed in #185. I will keep this part as is in this PR.
if names[1].startswith('param_'): | ||
prefix = names[1][:-6] # remove "_gamma" | ||
elif names[2].startswith('param_'): | ||
prefix = names[2][:-5] # remove "_beta" |
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.
ditto?
Ad-hoc approach