Skip to content

Commit

Permalink
bugfix: use hidden_dim_color instead of hidden_dim for color_net (ash…
Browse files Browse the repository at this point in the history
  • Loading branch information
ashawkey committed Sep 20, 2022
1 parent 6d5016f commit 2a5d4d0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions dnerf/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def __init__(self,
if l == 0:
in_dim = self.in_dim_dir + self.geo_feat_dim
else:
in_dim = hidden_dim
in_dim = hidden_dim_color

if l == num_layers_color - 1:
out_dim = 3 # 3 rgb
else:
out_dim = hidden_dim
out_dim = hidden_dim_color

color_net.append(nn.Linear(in_dim, out_dim, bias=False))

Expand Down
4 changes: 2 additions & 2 deletions dnerf/network_basis.py
Original file line number Diff line number Diff line change
Expand Up @@ -84,12 +84,12 @@ def __init__(self,
if l == 0:
in_dim = self.in_dim_dir + self.geo_feat_dim
else:
in_dim = hidden_dim
in_dim = hidden_dim_color

if l == num_layers_color - 1:
out_dim = 3 * self.color_basis_dim # 3 * CB rgb
else:
out_dim = hidden_dim
out_dim = hidden_dim_color

color_net.append(nn.Linear(in_dim, out_dim, bias=False))

Expand Down
4 changes: 2 additions & 2 deletions dnerf/network_hyper.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,12 @@ def __init__(self,
if l == 0:
in_dim = self.in_dim_dir + self.geo_feat_dim
else:
in_dim = hidden_dim
in_dim = hidden_dim_color

if l == num_layers_color - 1:
out_dim = 3 # 3 rgb
else:
out_dim = hidden_dim
out_dim = hidden_dim_color

color_net.append(nn.Linear(in_dim, out_dim, bias=False))

Expand Down
4 changes: 2 additions & 2 deletions nerf/network.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ def __init__(self,
if l == 0:
in_dim = self.in_dim_dir + self.geo_feat_dim
else:
in_dim = hidden_dim
in_dim = hidden_dim_color

if l == num_layers_color - 1:
out_dim = 3 # 3 rgb
else:
out_dim = hidden_dim
out_dim = hidden_dim_color

color_net.append(nn.Linear(in_dim, out_dim, bias=False))

Expand Down

0 comments on commit 2a5d4d0

Please sign in to comment.