Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nerf-pytorch
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
songxinkai
nerf-pytorch
Commits
7158181e
Commit
7158181e
authored
Apr 17, 2020
by
Yen-Chen Lin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Better training interface
parent
c3ccc0bd
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
6 deletions
+8
-6
run_nerf.py
+8
-6
No files found.
run_nerf.py
View file @
7158181e
...
...
@@ -8,7 +8,7 @@ import torch
import
torch.nn
as
nn
import
torch.nn.functional
as
F
from
torch.utils.tensorboard
import
SummaryWriter
from
tqdm
import
tqdm
from
tqdm
import
tqdm
,
trange
import
matplotlib.pyplot
as
plt
...
...
@@ -673,7 +673,7 @@ def train():
rays_rgb
=
torch
.
Tensor
(
rays_rgb
)
.
to
(
device
)
N_iters
=
1000000
N_iters
=
200000
+
1
print
(
'Begin'
)
print
(
'TRAIN views are'
,
i_train
)
print
(
'TEST views are'
,
i_test
)
...
...
@@ -682,7 +682,7 @@ def train():
# Summary writers
# writer = SummaryWriter(os.path.join(basedir, 'summaries', expname))
for
i
in
range
(
start
,
N_iters
):
for
i
in
t
range
(
start
,
N_iters
):
time0
=
time
.
time
()
# Sample random ray batch
...
...
@@ -745,7 +745,7 @@ def train():
################################
dt
=
time
.
time
()
-
time0
print
(
f
"Step: {global_step}, Loss: {loss}, Time: {dt}"
)
#
print(f"Step: {global_step}, Loss: {loss}, Time: {dt}")
##### end #####
# Rest is logging
...
...
@@ -784,11 +784,13 @@ def train():
print
(
'Saved test set'
)
"""
if i
%
args.i_print==0 or i < 10:
if
i
%
args
.
i_print
==
0
or
i
<
10
:
tqdm
.
write
(
f
"[TRAIN] Iter: {i} Loss: {loss.item()} PSNR: {psnr.item()}"
)
"""
print(expname, i, psnr.numpy(), loss.numpy(), global_step.numpy())
print('iter time {:.05f}'.format(dt))
with tf.contrib.summary.record_summaries_every_n_global_steps(args.i_print):
tf.contrib.summary.scalar('loss', loss)
tf.contrib.summary.scalar('psnr', psnr)
...
...
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