My code looks something like this:
self.train_one_step(hgrad)
# hgrad is the gradient manually calculated by the graphical model C++ code

And then, in the train_one_step() method, I call
h.backward(hgrad)

I guess my main question is, this is the correct way to handle a scenario like this (where we do not backward() directly from loss), right? If it is, then I guess it narrows my problem down to a data error or a gradient calculation error.