Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
OSLO 360-degree image compression
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor 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
On-the-Sphere Learning for Omnidirectional images (OSLO)
OSLO 360-degree image compression
Commits
50e03fdc
Commit
50e03fdc
authored
1 year ago
by
PaulWawerek-L
Browse files
Options
Downloads
Patches
Plain Diff
fix error if val_start > max_epoch
parent
178e4467
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!2
OSLO-IC
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
main_sphere_compression.py
+3
-3
3 additions, 3 deletions
main_sphere_compression.py
with
3 additions
and
3 deletions
main_sphere_compression.py
+
3
−
3
View file @
50e03fdc
...
...
@@ -589,7 +589,7 @@ def main():
plotGradFolder
=
os
.
path
.
join
(
args
.
out_dir
,
args
.
foldername_plot_gradient
)
if
args
.
foldername_plot_gradient
is
not
None
else
None
if
plotGradFolder
:
os
.
makedirs
(
plotGradFolder
,
exist_ok
=
True
)
perform_validation
=
False
for
epoch
in
range
(
last_epoch
+
1
,
args
.
max_epochs
):
# epoch=0...max_epochs-1, printing and checkpoint saving in 1...max_epochs
loss_train
=
train_epoch
(
train_dataloader
,
struct_loader
,
net
,
criterion
,
optimizer
,
optimizer_aux
,
args
.
patch_res_train
,
args
.
n_patch_per_sample
,
args
.
print_freq
,
epoch
,
args
.
clip_max_norm
,
plotGradFolder
)
...
...
@@ -643,8 +643,8 @@ def main():
save_checkpoint
(
states
,
is_best
,
args
.
out_dir
,
only_best_model
=
(
not
save_regular_checkpoint
))
# Saving last results
is_best
=
loss_validation
[
"
loss
"
]
<
best_loss
if
args
.
validation
_data
else
False
best_loss
=
min
(
loss_validation
[
"
loss
"
],
best_loss
)
if
args
.
validation
_data
else
best_loss
is_best
=
loss_validation
[
"
loss
"
]
<
best_loss
if
perform_
validation
else
False
best_loss
=
min
(
loss_validation
[
"
loss
"
],
best_loss
)
if
perform_
validation
else
best_loss
states
=
{
'
epoch
'
:
epoch
,
'
net_state_dict
'
:
net
.
state_dict
(),
...
...
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