forked from kaldi-asr/kaldi
-
Notifications
You must be signed in to change notification settings - Fork 3
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
adding dropout-by row #8
Open
GaofengCheng
wants to merge
12
commits into
vimalmanohar:dropout_schedule
Choose a base branch
from
GaofengCheng:dropout_combine_solve
base: dropout_schedule
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
6548b55
add dropout by row
GaofengCheng 23ae730
now only support by row dropout
GaofengCheng 614a868
revise
GaofengCheng c1d1ad1
adding scripts level dropout-by-row code
GaofengCheng 14662b6
adding kernel heavybyrow
GaofengCheng 1d22219
add cuda kernel to realize random-matrix-by row
GaofengCheng 5b8b98b
Revert "add cuda kernel to realize random-matrix-by row"
GaofengCheng 4137c9d
Revert "adding kernel heavybyrow"
GaofengCheng d721e59
updating existing best scripts
GaofengCheng 1e2adab
fix some bug and format
GaofengCheng 463a4dc
sublime tool to formate nnet-simple-component.cc
GaofengCheng d0290c3
Revert "sublime tool to formate nnet-simple-component.cc"
GaofengCheng File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -87,11 +87,13 @@ class PnormComponent: public Component { | |
// "Dropout: A Simple Way to Prevent Neural Networks from Overfitting". | ||
class DropoutComponent : public RandomComponent { | ||
public: | ||
void Init(int32 dim, BaseFloat dropout_proportion = 0.0); | ||
void Init(int32 dim, BaseFloat dropout_proportion = 0.0, bool dropout_per_frame = false); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. please watch line length. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. line too long |
||
|
||
DropoutComponent(int32 dim, BaseFloat dropout = 0.0) { Init(dim, dropout); } | ||
DropoutComponent(int32 dim, BaseFloat dropout = 0.0, bool dropout_per_frame = false) { | ||
Init(dim, dropout, dropout_per_frame); | ||
} | ||
|
||
DropoutComponent(): dim_(0), dropout_proportion_(0.0) { } | ||
DropoutComponent(): dim_(0), dropout_proportion_(0.0), dropout_per_frame_(false) { } | ||
|
||
virtual int32 Properties() const { | ||
return kLinearInInput|kBackpropInPlace|kSimpleComponent|kBackpropNeedsInput|kBackpropNeedsOutput; | ||
|
@@ -120,17 +122,20 @@ class DropoutComponent : public RandomComponent { | |
Component *to_update, | ||
CuMatrixBase<BaseFloat> *in_deriv) const; | ||
virtual Component* Copy() const { return new DropoutComponent(dim_, | ||
dropout_proportion_); } | ||
dropout_proportion_, | ||
dropout_per_frame_); } | ||
virtual std::string Info() const; | ||
|
||
void SetDropoutProportion(BaseFloat dropout_proportion) { dropout_proportion_ = dropout_proportion; } | ||
void SetDropoutProportion(BaseFloat dropout_proportion) { | ||
dropout_proportion_ = dropout_proportion; | ||
} | ||
|
||
private: | ||
int32 dim_; | ||
/// dropout-proportion is the proportion that is dropped out, | ||
/// e.g. if 0.1, we set 10% to zero value. | ||
BaseFloat dropout_proportion_; | ||
|
||
bool dropout_per_frame_; | ||
}; | ||
|
||
class ElementwiseProductComponent: public Component { | ||
|
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
when you do a new experiment you should create a different letter/number combination, e.g. 1j, and use the 'compare_wer_general.sh' script or whatever it's called to compare with the baseline, if possible. please stay within the existing conventions for script naming.
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.
... also, if the per-frame dropout turns out, in the end, not to be that useful, we might not want to check it into Kaldi. But let's see how your experiments turn out.
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.
@danpovey it would be better if you could have a look at whether my
nnet-simple-component.cc
in PR has the right format.....