Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Redmine
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
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
5fae577a
Commit
5fae577a
authored
Feb 3, 2024
by
Martyna Wiącek
Browse files
Options
Downloads
Patches
Plain Diff
fixed name of gelu function
parent
25ccba60
Branches
Branches containing commit
Tags
Tags containing commit
1 merge request
!47
Fixed multiword prediction + bug that made the code write empty predictions
This commit is part of merge request
!47
. Comments created here will be created in the context of that merge request.
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
combo/default_model.py
+4
-4
4 additions, 4 deletions
combo/default_model.py
combo/nn/activations.py
+1
-1
1 addition, 1 deletion
combo/nn/activations.py
with
5 additions
and
5 deletions
combo/default_model.py
+
4
−
4
Edit
View file @
5fae577a
...
@@ -19,7 +19,7 @@ from combo.modules.morpho import MorphologicalFeatures
...
@@ -19,7 +19,7 @@ from combo.modules.morpho import MorphologicalFeatures
from
combo.modules.parser
import
DependencyRelationModel
,
HeadPredictionModel
from
combo.modules.parser
import
DependencyRelationModel
,
HeadPredictionModel
from
combo.modules.text_field_embedders
import
BasicTextFieldEmbedder
from
combo.modules.text_field_embedders
import
BasicTextFieldEmbedder
from
combo.modules.token_embedders
import
CharacterBasedWordEmbedder
,
TransformersWordEmbedder
from
combo.modules.token_embedders
import
CharacterBasedWordEmbedder
,
TransformersWordEmbedder
from
combo.nn.activations
import
ReLUActivation
,
TanhActivation
,
LinearActivation
from
combo.nn.activations
import
ReLUActivation
,
TanhActivation
,
LinearActivation
,
GELUActivation
from
combo.modules
import
FeedForwardPredictor
from
combo.modules
import
FeedForwardPredictor
from
combo.nn.base
import
Linear
from
combo.nn.base
import
Linear
from
combo.nn.regularizers.regularizers
import
L2Regularizer
from
combo.nn.regularizers.regularizers
import
L2Regularizer
...
@@ -128,10 +128,10 @@ def default_model(pretrained_transformer_name: str, vocabulary: Vocabulary) -> C
...
@@ -128,10 +128,10 @@ def default_model(pretrained_transformer_name: str, vocabulary: Vocabulary) -> C
),
),
lemmatizer
=
LemmatizerModel
(
lemmatizer
=
LemmatizerModel
(
vocabulary
=
vocabulary
,
vocabulary
=
vocabulary
,
activations
=
[
Re
LUActivation
(),
Re
LUActivation
(),
Re
LUActivation
(),
LinearActivation
()],
activations
=
[
GE
LUActivation
(),
GE
LUActivation
(),
GE
LUActivation
(),
LinearActivation
()],
char_vocab_namespace
=
"
token_characters
"
,
char_vocab_namespace
=
"
token_characters
"
,
dilation
=
[
1
,
2
,
4
,
1
],
dilation
=
[
1
,
2
,
4
,
1
],
embedding_dim
=
256
,
embedding_dim
=
300
,
filters
=
[
256
,
256
,
256
],
filters
=
[
256
,
256
,
256
],
input_projection_layer
=
Linear
(
input_projection_layer
=
Linear
(
activation
=
TanhActivation
(),
activation
=
TanhActivation
(),
...
@@ -183,7 +183,7 @@ def default_model(pretrained_transformer_name: str, vocabulary: Vocabulary) -> C
...
@@ -183,7 +183,7 @@ def default_model(pretrained_transformer_name: str, vocabulary: Vocabulary) -> C
"
char
"
:
CharacterBasedWordEmbedder
(
"
char
"
:
CharacterBasedWordEmbedder
(
vocabulary
=
vocabulary
,
vocabulary
=
vocabulary
,
dilated_cnn_encoder
=
DilatedCnnEncoder
(
dilated_cnn_encoder
=
DilatedCnnEncoder
(
activations
=
[
Re
LUActivation
(),
Re
LUActivation
(),
LinearActivation
()],
activations
=
[
GE
LUActivation
(),
GE
LUActivation
(),
LinearActivation
()],
dilation
=
[
1
,
2
,
4
],
dilation
=
[
1
,
2
,
4
],
filters
=
[
512
,
256
,
64
],
filters
=
[
512
,
256
,
64
],
input_dim
=
64
,
input_dim
=
64
,
...
...
This diff is collapsed.
Click to expand it.
combo/nn/activations.py
+
1
−
1
Edit
View file @
5fae577a
...
@@ -39,7 +39,7 @@ class ReLUActivation(Activation):
...
@@ -39,7 +39,7 @@ class ReLUActivation(Activation):
@Registry.register
(
'
gelu
'
)
@Registry.register
(
'
gelu
'
)
class
Re
LUActivation
(
Activation
):
class
GE
LUActivation
(
Activation
):
def
__init__
(
self
):
def
__init__
(
self
):
super
().
__init__
()
super
().
__init__
()
self
.
__torch_activation
=
torch
.
nn
.
GELU
()
self
.
__torch_activation
=
torch
.
nn
.
GELU
()
...
...
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