Skip to content

Commit

Permalink
Merge branch 'master' into master
Browse files Browse the repository at this point in the history
  • Loading branch information
duckworthd authored Apr 7, 2020
2 parents 2d4409d + cf364d9 commit 7bda034
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
9 changes: 5 additions & 4 deletions run_nerf.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,12 @@ def run_network(inputs, viewdirs, fn, embed_fn, embeddirs_fn, netchunk=1024*64):
return outputs


def render_rays(ray_batch,
network_fn,

def render_rays(ray_batch,
network_fn,
network_query_fn,
N_samples,
retraw=False,
N_samples,
retraw=False,
lindisp=False,
perturb=0.,
N_importance=0,
Expand Down
6 changes: 4 additions & 2 deletions run_nerf_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -104,8 +104,10 @@ def dense(W, act=relu): return tf.keras.layers.Dense(W, activation=act)
bottleneck = dense(256, act=None)(outputs)
inputs_viewdirs = tf.concat(
[bottleneck, inputs_views], -1) # concat viewdirs
for i in range(D//2):
outputs = dense(W//2)(inputs_viewdirs)
# The supplement to the paper states there are 4 hidden layers here, but this is an error since
# the experiments were actually run with 1 hidden layer, so we will leave it as 1.
for i in range(1):
outputs = dense(W//2)(outputs)
outputs = dense(3, act=None)(outputs)
outputs = tf.concat([outputs, alpha_out], -1)
else:
Expand Down

0 comments on commit 7bda034

Please sign in to comment.