Hello everyone,
I created a C extension based on the FFI tutorial in “Custom C extensions for pytorch” (http://pytorch.org/tutorials/advanced/c_extension.html). I would like to be able to call the backward function but it returns the following error:

`RuntimeError: there are no graph nodes that require computing gradients`


Actually, even trying to call backward() in the provided example code returns an error on my machine. I tried adding the following commands at the end of the main.py function.

model = MyNetwork()
out = model(input1, input2)
out.backward()

Am I doing something wrong? Any idea how to make this work?
Any help would be appreciated.
Thanks,