-
Notifications
You must be signed in to change notification settings - Fork 137
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
LSTM Regression #1519
LSTM Regression #1519
Conversation
for Prescient requirements.
It makes the training easier for the RNN.
Job Test mac on c2647a1 : invalidated by @joshua-cogliati-inl restarted civet |
Job Mingw Test on c2647a1 : invalidated by @joshua-cogliati-inl restarted civet |
from .SupervisedLearning import supervisedLearning | ||
#Internal Modules End-------------------------------------------------------------------------------- | ||
|
||
class KerasRegression(supervisedLearning): |
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.
I think this class need to be merged with the KerasClassifier class. Most of the functionalities are the same for both Regression and Classifier. I think a new base class can be extracted from these two classes.
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.
I completely agree (this is one of the reasons this is marked Do Not Merge). My plan is to make a KerasBaseClass, and put the common things in KerasRegression and KerasClassifier in it.
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.
I have created a base class and pulled some common features out to it. I am still deciding if I need to work a bit more to get more common functions out or not.
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.
I think I have extracted pretty much all of the common functionality into a base class. So if you want to take a look now, it would be welcome.
ff10494
to
e4a31fa
Compare
Job Mingw Test on e4a31fa : invalidated by @joshua-cogliati-inl restarted civet |
4cda313
to
dfad1fa
Compare
Job Test Fedora 31 on dfad1fa : invalidated by @joshua-cogliati-inl failed tests/framework/ensembleModelTests/testEnsembleModelLateralInsertions |
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.
Some minor comments for your consideration. It is a good start to create the base class for neural network.
When I compared the KerasLSTMClassifier and KerasLSTMRegression, they share most of the functions. This suggests to me it is probably better to combine these two classes. I suggest we have group discussion. @alfoa @joshua-cogliati-inl |
self.initOptionDict[layerName]['return_sequences'] = True | ||
self.raiseAWarning('return_sequences is resetted to True for layer',layerName) | ||
|
||
def _preprocessInputs(self,featureVals): |
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.
@wangcj05 Hm, I think I could move _preprocessInputs to KerasBase, if you agree that would be a good idea. I think that removes the major redundancy in KerasLSTMRegression and KerasLSTMCLassifier.
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.
I think this is tied to LSTM. It is not general all neural network.
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.
Hm, then I could just make a LSTM utils, and put the function in that, and use it in both.
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.
Tho' since @alfoa is going to be making changes to this soon, maybe I should just put a comment in both files that it is identical, and after the changes we can decide if it is worth changing.
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.
To me, a comment is fine. I think my comments are more for future. How do we want the DNN classes inheritance look like? @alfoa any more comments? BTW, the issue that I raised can be further discussed and addressed in future PR.
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.
Okay, I added a comment to the source code.
4ded24b
to
b6b21a3
Compare
@joshua-cogliati-inl qsubs failed, could you take a look? |
Job Test qsubs on 9b7b418 : invalidated by @joshua-cogliati-inl Failed tests/framework/Samplers/Categorical/RestartMissingVars |
Job Test qsubs on 9b7b418 : invalidated by @joshua-cogliati-inl Failed tests/framework/CodeInterfaceTests/RAVEN/Basic |
This PR is good. Checklist is satisfied, and tests are green (OpenSUSE Leap 15 is down for now.). |
Pull Request Description
What issue does this change request address?
Closes #1540
What are the significant changes in functionality due to this change request?
Adds a LSTM regression (we have an existing LSTM classifier)
For Change Control Board: Change Request Review
The following review must be completed by an authorized member of the Change Control Board.
<internalParallel>
to True.raven/tests/framework/user_guide
andraven/docs/workshop
) have been changed, the associated documentation must be reviewed and assured the text matches the example.