Hi @albanD,
Thank you for the quick response! So, I’ve checked the shapes of the forward and backward methods in my custom Autograd Function, and they’re the same shape of [1, 4, 4].
I did have a look at the library torchviz to compare between torch.det and my custom_det function. My custom_det function seems to add in a Tensor of shape [25, 4, 4] corresponding to the number of matrices within a given batch to the function which (might?) be causing the error?. Whereas DetBackward doesn’t add anything (unless it does a simplier thing behind the scenes?)
PyTorch_det_vs_Custom_det_zoom818×190 9.94 KB
Thank you for the help!