minor fix

This commit is contained in:
Kai Zhang 2020-10-15 23:30:57 -04:00 committed by GitHub
parent 19fbf43032
commit 77d5146ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,7 +111,7 @@ class MLPNet(nn.Module):
for i in range(1): for i in range(1):
rgb_layers.append(nn.Linear(dim, W // 2)) rgb_layers.append(nn.Linear(dim, W // 2))
rgb_layers.append(nn.ReLU()) rgb_layers.append(nn.ReLU())
dim = W dim = W // 2
rgb_layers.append(nn.Linear(dim, 3)) rgb_layers.append(nn.Linear(dim, 3))
rgb_layers.append(nn.Sigmoid()) # rgb values are normalized to [0, 1] rgb_layers.append(nn.Sigmoid()) # rgb values are normalized to [0, 1]
self.rgb_layers = nn.Sequential(*rgb_layers) self.rgb_layers = nn.Sequential(*rgb_layers)