Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
K
kaldi-commonvoice
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Simon Will
kaldi-commonvoice
Commits
90fa434e
Commit
90fa434e
authored
9 years ago
by
Daniel Povey
Browse files
Options
Downloads
Plain Diff
Merge pull request #153 from keli78/test1
Modified virtual functions Scale and Add
parents
cb05ff96
8d929ff5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/nnet3/nnet-component-itf.h
+2
-2
2 additions, 2 deletions
src/nnet3/nnet-component-itf.h
src/nnet3/nnet-simple-component.h
+0
-14
0 additions, 14 deletions
src/nnet3/nnet-simple-component.h
with
2 additions
and
16 deletions
src/nnet3/nnet-component-itf.h
+
2
−
2
View file @
90fa434e
...
...
@@ -310,14 +310,14 @@ class Component {
// -- an UpdatableComponent scales the parameters
/// by "scale" when called by an UpdatableComponent.
// -- a NonLinear component it relates to scaling activation stats, not parameters.
virtual
void
Scale
(
BaseFloat
scale
)
=
0
;
virtual
void
Scale
(
BaseFloat
scale
)
{}
;
/// This virtual function when called by
// -- an UpdatableComponent adds the parameters of
/// another updatable component, times some constant, to the current
/// parameters.
// -- a NonlinearComponent it relates to adding stats
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
=
0
;
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{}
;
Component
()
{
}
...
...
This diff is collapsed.
Click to expand it.
src/nnet3/nnet-simple-component.h
+
0
−
14
View file @
90fa434e
...
...
@@ -66,10 +66,6 @@ class PnormComponent: public Component {
virtual
Component
*
Copy
()
const
{
return
new
PnormComponent
(
input_dim_
,
output_dim_
);
}
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
// This Read function
// requires that the Component has the correct type.
...
...
@@ -109,8 +105,6 @@ class ElementwiseProductComponent: public Component {
virtual
Component
*
Copy
()
const
{
return
new
ElementwiseProductComponent
(
input_dim_
,
output_dim_
);
}
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
// This Read function
// requires that the Component has the correct type.
...
...
@@ -505,8 +499,6 @@ class FixedAffineComponent: public Component {
virtual
Component
*
Copy
()
const
;
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
virtual
void
Write
(
std
::
ostream
&
os
,
bool
binary
)
const
;
...
...
@@ -550,8 +542,6 @@ public:
Component
*
to_update
,
CuMatrixBase
<
BaseFloat
>
*
in_deriv
)
const
;
virtual
Component
*
Copy
()
const
;
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
virtual
void
Write
(
std
::
ostream
&
os
,
bool
binary
)
const
;
...
...
@@ -599,8 +589,6 @@ class FixedScaleComponent: public Component {
Component
*
,
// to_update
CuMatrixBase
<
BaseFloat
>
*
in_deriv
)
const
;
virtual
Component
*
Copy
()
const
;
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
virtual
void
Write
(
std
::
ostream
&
os
,
bool
binary
)
const
;
...
...
@@ -643,8 +631,6 @@ class FixedBiasComponent: public Component {
Component
*
,
// to_update
CuMatrixBase
<
BaseFloat
>
*
in_deriv
)
const
;
virtual
Component
*
Copy
()
const
;
virtual
void
Scale
(
BaseFloat
scale
)
{};
virtual
void
Add
(
BaseFloat
alpha
,
const
Component
&
other
)
{};
virtual
void
Read
(
std
::
istream
&
is
,
bool
binary
);
virtual
void
Write
(
std
::
ostream
&
os
,
bool
binary
)
const
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment