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
The PyTorchYolo and PyTorchObjectDetectorobject detection estimators modify the original numpy array. This occurs because the torch.from_numpy and in-place torch methods are being used which will re-use the memory from the original numpy array.
To Reproduce
Create a PyTorchYolo model with the clip_values set to (0, 255). Create any numpy image and pass it to the model via the predict method. The original numpy array will be modified.
The following snippets show a simplified version of what is happening:
Expected behavior
The original numpy array should not be modified. This can be fixed by either making a copy or not using in-place operations. One unknown point is how much of the inputs should be copied (i.e., only images or both images and labels).
Screenshots
N/A
System information (please complete the following information):
OS
Python version
ART version or commit number
TensorFlow / Keras / PyTorch / MXNet version
The text was updated successfully, but these errors were encountered:
Describe the bug
The
PyTorchYolo
andPyTorchObjectDetector
object detection estimators modify the original numpy array. This occurs because thetorch.from_numpy
and in-place torch methods are being used which will re-use the memory from the original numpy array.To Reproduce
Create a
PyTorchYolo
model with theclip_values
set to(0, 255)
. Create any numpy image and pass it to the model via thepredict
method. The original numpy array will be modified.The following snippets show a simplified version of what is happening:
Expected behavior
The original numpy array should not be modified. This can be fixed by either making a copy or not using in-place operations. One unknown point is how much of the inputs should be copied (i.e., only images or both images and labels).
Screenshots
N/A
System information (please complete the following information):
The text was updated successfully, but these errors were encountered: