Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Nianchen Deng
deeplightfield
Commits
90553bac
Commit
90553bac
authored
Jan 18, 2021
by
BobYeah
Browse files
sync
parent
408738c8
Changes
1
Hide whitespace changes
Inline
Side-by-side
run_spherical_view_syn.py
View file @
90553bac
...
...
@@ -7,7 +7,7 @@ from tensorboardX import SummaryWriter
from
torch
import
nn
sys
.
path
.
append
(
os
.
path
.
abspath
(
sys
.
path
[
0
]
+
'/../'
))
__package__
=
"deep
_view_syn
"
__package__
=
"deep
lightfield
"
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--device'
,
type
=
int
,
default
=
3
,
...
...
@@ -138,7 +138,7 @@ def train_loop(data_loader, optimizer, loss, perf, writer, epoch, iters):
loss_min
=
1e5
loss_max
=
0
loss_avg
=
0
perf
=
SimplePerf
(
opt
.
simple_log
)
perf
1
=
SimplePerf
(
opt
.
simple_log
,
True
)
for
_
,
gt
,
rays_o
,
rays_d
in
data_loader
:
patch
=
(
len
(
gt
.
size
())
==
4
)
gt
=
gt
.
to
(
device
.
GetDevice
())
...
...
@@ -185,7 +185,7 @@ def train_loop(data_loader, optimizer, loss, perf, writer, epoch, iters):
iters
+=
1
sub_iters
+=
1
if
opt
.
simple_log
:
perf
.
Checkpoint
(
'Epoch %d (%.2e/%.2e/%.2e)'
%
(
epoch
,
loss_min
,
loss_avg
,
loss_max
),
True
)
perf
1
.
Checkpoint
(
'Epoch %d (%.2e/%.2e/%.2e)'
%
(
epoch
,
loss_min
,
loss_avg
,
loss_max
),
True
)
return
iters
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment