Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
Comp3200
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor 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
eca1g19
Comp3200
Commits
4df3d566
Commit
4df3d566
authored
Jun 16, 2023
by
eca1g19
Browse files
Options
Downloads
Patches
Plain Diff
Commit local changes (there are a lot)
parent
49c5f1e5
No related branches found
No related tags found
No related merge requests found
Changes
2
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
lightning_models.py
+1
-1
1 addition, 1 deletion
lightning_models.py
main_lightning.ipynb
+171
-54
171 additions, 54 deletions
main_lightning.ipynb
with
172 additions
and
55 deletions
lightning_models.py
+
1
−
1
View file @
4df3d566
...
@@ -161,7 +161,7 @@ class Seq2SeqLightning(LightningModule):
...
@@ -161,7 +161,7 @@ class Seq2SeqLightning(LightningModule):
output
=
self
(
input_ids
,
attention_mask
,
decoder_input_ids
,
decoder_attention_mask
)
output
=
self
(
input_ids
,
attention_mask
,
decoder_input_ids
,
decoder_attention_mask
)
loss
=
self
.
criterion
(
output
.
view
(
-
1
,
output
.
size
(
-
1
)),
labels
.
view
(
-
1
),
ignore_index
=
0
)
loss
=
self
.
criterion
(
output
.
view
(
-
1
,
output
.
size
(
-
1
)),
labels
.
view
(
-
1
),
ignore_index
=
0
)
self
.
log
(
'
train_loss
'
,
loss
)
self
.
log
(
'
train_loss
'
,
loss
)
return
loss
return
loss
.
item
()
def
validation_step
(
self
,
batch
,
batch_idx
):
def
validation_step
(
self
,
batch
,
batch_idx
):
input_ids
=
batch
[
'
input_ids
'
]
input_ids
=
batch
[
'
input_ids
'
]
...
...
This diff is collapsed.
Click to expand it.
main_lightning.ipynb
+
171
−
54
View file @
4df3d566
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