I am getting an error while executing the following code:
with autograd.record(): outY = network(batchInput) totalLoss = nd.mean((outY - batchOutput)**2) + network.cost()
The error message says “Check failed: AGInfo::IsNone(*(outputs[i])) Assigning to NDArrays that are already in a computational graph will cause undefined behavior when evaluating gradients. Please call backward first to clear the graph or do this out side of a record section.”.
Any insight into what could cause this error and how to fix it?
Thanks a lot!