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
234f9b61
Commit
234f9b61
authored
1 year ago
by
Maja Jablonska
Browse files
Options
Downloads
Patches
Plain Diff
Serialization - added model weights
parent
baa4b609
1 merge request
!46
Merge COMBO 3.0 into master
Changes
2
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
combo/modules/model.py
+1
-0
1 addition, 0 deletions
combo/modules/model.py
combo/polish_model_training.ipynb
+205
-101
205 additions, 101 deletions
combo/polish_model_training.ipynb
with
206 additions
and
101 deletions
combo/modules/model.py
+
1
−
0
View file @
234f9b61
...
...
@@ -500,6 +500,7 @@ class Model(Module, FromParameters):
vocabulary_dir
=
os
.
path
.
join
(
self
.
serialization_dir
,
'
vocabulary
'
)
self
.
vocab
.
_serialization_dir
=
vocabulary_dir
weights_path
=
os
.
path
.
join
(
self
.
serialization_dir
,
'
weights.pth
'
)
torch
.
save
(
self
.
state_dict
(),
weights_path
)
serialized_model
=
super
().
serialize
()
serialized_model
[
'
weights
'
]
=
weights_path
return
serialized_model
...
...
This diff is collapsed.
Click to expand it.
combo/polish_model_training.ipynb
+
205
−
101
View file @
234f9b61
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