Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
C
combo
Manage
Activity
Members
Labels
Plan
Issues
20
Issue boards
Milestones
Wiki
Redmine
Code
Merge requests
2
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Syntactic Tools
combo
Commits
fcb97076
Commit
fcb97076
authored
1 year ago
by
Martyna Wiącek
Browse files
Options
Downloads
Patches
Plain Diff
added separate validation batches per epoch
parent
11b2e8a3
Branches
Branches containing commit
1 merge request
!47
Fixed multiword prediction + bug that made the code write empty predictions
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
combo/main.py
+3
-1
3 additions, 1 deletion
combo/main.py
with
3 additions
and
1 deletion
combo/main.py
+
3
−
1
View file @
fcb97076
...
...
@@ -63,6 +63,8 @@ flags.DEFINE_integer(name="batch_size", default=256,
help
=
"
Batch size
"
)
flags
.
DEFINE_integer
(
name
=
"
batches_per_epoch
"
,
default
=
16
,
help
=
"
Number of batches per epoch
"
)
flags
.
DEFINE_integer
(
name
=
"
validation_batches_per_epoch
"
,
default
=
4
,
help
=
"
Number of batches per epoch
"
)
flags
.
DEFINE_string
(
name
=
"
pretrained_transformer_name
"
,
default
=
"
bert-base-cased
"
,
help
=
"
Pretrained transformer model name (see transformers from HuggingFace library for list of
"
"
available models) for transformers based embeddings.
"
)
...
...
@@ -170,7 +172,7 @@ def get_defaults(dataset_reader: Optional[DatasetReader],
str
(
training_data_loader
.
data_path
),
prefix
=
prefix
)
if
FLAGS
.
validation_data_path
and
not
validation_data_loader
:
validation_data_loader
=
default_data_loader
(
dataset_reader
,
validation_data_path
,
FLAGS
.
batch_size
,
FLAGS
.
batches_per_epoch
)
validation_data_loader
=
default_data_loader
(
dataset_reader
,
validation_data_path
,
FLAGS
.
batch_size
,
FLAGS
.
validation_
batches_per_epoch
)
elif
FLAGS
.
validation_data_path
and
validation_data_loader
:
if
validation_data_path
:
validation_data_loader
.
data_path
=
validation_data_path
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
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