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
b8eaa291
Commit
b8eaa291
authored
1 year ago
by
PaulWawerek-L
Browse files
Options
Downloads
Patches
Plain Diff
read seedValue automatically
parent
7d038eb8
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
+8
-2
8 additions, 2 deletions
main_sphere_compression.py
with
8 additions
and
2 deletions
main_sphere_compression.py
+
8
−
2
View file @
b8eaa291
...
...
@@ -432,11 +432,17 @@ def main():
print
(
f
"
{
key
:
_
<
40
}
:
{
val
}
\n
"
)
# check this for all kinds of formatting
print
(
"
=
"
*
60
+
"
\n
"
)
seedValue
=
random
.
randrange
(
2
**
32
)
# create a seed
if
args
.
seed
is
not
None
:
seedValue
=
args
.
seed
else
:
seedValue
=
random
.
randrange
(
2
**
32
)
# create a seed
elif
args
.
checkpoint_file
and
os
.
path
.
isfile
(
os
.
path
.
join
(
args
.
out_dir
,
'
config.txt
'
)):
with
open
(
os
.
path
.
join
(
args
.
out_dir
,
'
config.txt
'
),
'
r
'
)
as
f
:
config_lines
=
f
.
readlines
()
for
line
in
config_lines
:
if
line
.
strip
().
startswith
(
'
seedValue
'
):
seedValue
=
int
(
line
.
split
(
'
:
'
)[
1
])
common_pytorch
.
set_seed
(
seedValue
)
device_str
=
'
cpu
'
if
args
.
gpu
and
torch
.
cuda
.
is_available
():
device_str
=
'
cuda
'
...
...
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