Skip to content
This repository was archived by the owner on Jul 30, 2024. It is now read-only.

An error on Colab Full Nerf #31

@lqy93

Description

@lqy93

When I run the Colab script for Full Nerf version an error occurred:

RuntimeError                              Traceback (most recent call last)
<ipython-input-26-1d7c06d853cb> in <module>()
    119     loss = coarse_loss + fine_loss
    120     print(coarse_loss.shape,fine_loss.shape)
--> 121     loss.backward()
    122     optimizer.step()
    123     optimizer.zero_grad()

1 frames
/usr/local/lib/python3.7/dist-packages/torch/_tensor.py in backward(self, gradient, retain_graph, create_graph, inputs)
    253                 create_graph=create_graph,
    254                 inputs=inputs)
--> 255         torch.autograd.backward(self, gradient, retain_graph, create_graph, inputs=inputs)
    256 
    257     def register_hook(self, hook):

/usr/local/lib/python3.7/dist-packages/torch/autograd/__init__.py in backward(tensors, grad_tensors, retain_graph, create_graph, grad_variables, inputs)
    147     Variable._execution_engine.run_backward(
    148         tensors, grad_tensors_, retain_graph, create_graph, inputs,
--> 149         allow_unreachable=True, accumulate_grad=True)  # allow_unreachable flag
    150 
    151 

**RuntimeError: Function AddmmBackward returned an invalid gradient at index 2 - got [72, 128] but expected shape compatible with [66, 128]**

I didn't change any code. How to solve the problem? Or do I need to set any configuration?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions