-
Notifications
You must be signed in to change notification settings - Fork 661
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
Refactored Identifiers #3381
Refactored Identifiers #3381
Conversation
@@ -197,7 +197,7 @@ public Trainer newTrainer(TrainingConfig trainingConfig) { | |||
// Unfreeze parameters if training directly | |||
block.freezeParameters( | |||
false, | |||
p -> p.getType() != Type.RUNNING_MEAN && p.getType() != Type.RUNNING_VAR); | |||
param -> param.getType() != Type.RUNNING_MEAN && param.getType() != Type.RUNNING_VAR); |
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.
short parameter name in lambda is very common. I don't think this change is necessary.
@@ -91,8 +91,8 @@ public void load(Path modelPath, String prefix, Map<String, ?> options) | |||
configProto = (ConfigProto) config; | |||
} else if (config instanceof String) { | |||
try { | |||
byte[] buf = Base64.getDecoder().decode((String) config); | |||
configProto = ConfigProto.parseFrom(buf); | |||
byte[] buffer = Base64.getDecoder().decode((String) config); |
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.
The same here, buf
is pretty common short name for buffer
@@ -72,8 +72,8 @@ public static void testGetterSetters(Class<?> baseClass) | |||
continue; | |||
} | |||
|
|||
Method[] methods = clazz.getDeclaredMethods(); | |||
for (Method method : methods) { | |||
Method[] declaredMethods = clazz.getDeclaredMethods(); |
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.
declaredMethods
might be more clear, but I don't feel methods
is a bad local variable name.
6156c82
to
b74c490
Compare
Description
Refactored certain identifiers in the code - expanded certain variable names according to its usage in the code to make them more descriptive. Meanwhile, changed "testOffLine" to "testOffline" as "Offline" is a single word, to conform to Java naming conventions.