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
Refine AbstractModule methods #2262
Conversation
One idea is we can provide a common method for |
* | ||
* This function will go over all the weights and gradWeights and make them view into a single | ||
* tensor (one for weights and one for gradWeights). Since the storage of every weight and | ||
* gradWeight is changed. |
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.
Feels like this sentence is not finished.
@zhichao-li This PR is removing the unnecessary zeroGrad methods. ZeroGrad is using parameter() method to get the grads. We needn't an extra getGrad methods |
13e12ef
to
568a5d4
Compare
jenkins test pass |
Validator(this, dataSet).test(vMethods) | ||
} | ||
|
||
def quantize(): Module[T] = { | ||
/** | ||
* Quantize this module, whcih reduces the precison of the parameter. Get a higher speed with a |
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.
"which" and "precision" are spelled wrong.
LGTM |
b6a123c
to
197f6cd
Compare
19bba04
to
36f6cde
Compare
jenkins pass.merge |
* make getParameter be final and private * remove updateParameter Method * remove useless override zeroGrad * fix comments * fix unit tests * fix unit tests * allocate gradWeight storage if it's not allocated * fix unit test * meet code review * make zeroGrad become final * fix compile error * add final to module apis * add private[bigdl] to some module methods * reorder the method sequence * meet code review * remove unnecessary getParameterTable and fix unit test * fix unit test * fix unit test
What changes were proposed in this pull request?
This PR is code refactor, include:
How was this patch tested?
unit test
Related links or issues (optional)
fixed #966