Inplace operation manipulate the data in the tensor directly without creating a new return tensor. Such operations would have an underscore such as tensor.sigmoid_(). If you index a tensor and assign a value to it, this error might also be raised, so you should instead create a new tensor using the return values.


Yes, the ROIPool layer has a backward method and thus Autograd can compute the gradient and pass the gradient to the previous layers.