It seems like the source code is missing two arguments in nerf_forward_pass function, the nerf_forward_pass function has 19 arguments and it inputs only 17, but I still got the same error after adding the two missing arguments. How do I solve this problem?
I would be glad if you can provide guidelines or solutions.
Could you post the complete stack trace of the error message?
I guess a linear layer might be using a wrong number of in_features for the incoming activations and will thus yield this shape mismatch.
I contacted the author, he said he enabled the public editing. I think that’s why this error occurred. It is very likely that someone mistakenly edited the code. But recently the author is not available, so it would be long until he comes back to fix it.
Add print statements to show the shape of each activation before feeding it into a linear layer in the forward function via:
x = ...
print(x.shape)
x = self.fc(x)
This would tell you which activation is causing this error and if a reshaping is done in a wrong way or if the in_features of the linear are set to a wrong value.