You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
When running the DPatch attack for the PyTorchObjectDetector and PyTorchFasterRCNN, an error can occur when using any PyTorch-specific preprocessors.
To Reproduce
Run the DPatch patch attack on the PyTorchObjectDetector while using a Faster R-CNN model. When using additional PyTorch-specific preprocessors, the error above will occur.
Expected behavior
The attacks should run without error. It can be easily fixed by adding the following line to the _get_losses method in the PyTorchObjectDetector class:
Describe the bug
When running the DPatch attack for the
PyTorchObjectDetector
andPyTorchFasterRCNN
, an error can occur when using any PyTorch-specific preprocessors.To Reproduce
Run the DPatch patch attack on the
PyTorchObjectDetector
while using a Faster R-CNN model. When using additional PyTorch-specific preprocessors, the error above will occur.Expected behavior
The attacks should run without error. It can be easily fixed by adding the following line to the
_get_losses
method in thePyTorchObjectDetector
class:This error occurs because the gradient retention property is lost when moving a tensor to a different device.
Screenshots
If applicable, add screenshots to help explain your problem.
System information (please complete the following information):
The text was updated successfully, but these errors were encountered: