Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

White space #3

Closed
danperazzo opened this issue May 25, 2021 · 2 comments
Closed

White space #3

danperazzo opened this issue May 25, 2021 · 2 comments

Comments

@danperazzo
Copy link

Hello, thank you for releasing this implementation. I tried to use the scripts for view synthesis from a single image. I am running with CUDA 10.1 in a Ubuntu 16.04. I am using the lamps set of images and the lamps config script. However, when I end training, the resulting video is blank, with only a white void.

@sanowar-raihan
Copy link
Owner

Hi. The result video is blank because training did not converge. If you have an "unlucky" initialization, ReLU will only emit zero values for sigma and optimization will fail.

The solution is to replace F.relu() in the line below with F.softplus() :

sigma = F.relu(out[..., -1])

This is discussed in the mip-NeRF paper:

In the original NeRF paper, the activation functions used by the MLP to construct the predicted density τ and color c are a ReLU and a sigmoid, respectively. Instead of a ReLU as the activation function to produce τ , we use a shifted softplus: log(1 + exp(x − 1)). We found that using a softplus yielded a smoother optimization problem that is less prone to catastrophic failure modes in which the MLP emits negative values everywhere (in which case all gradients from τ are zero and optimization will fail).

@sanowar-raihan
Copy link
Owner

Resolved with #4. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants