I am using a model for Faster RCNN. The model looks something like this
device = torch.device("cuda:0" if torch.cuda.is_available() else "cpu")
model = torchvision.models.detection.fasterrcnn_resnet50_fpn(pretrained=False,num_classes=4)
model.to(device)

The problem is when I am sending input bounding boxes after every single forward pass the bounding box value of the input tensor is getting altered. I have attached the code snippet below
print("In train before:")
print(y_train[0]["boxes"])
output = model(x_train,y_train)
print("In train after")
 print(y_train[0]["boxes"])

I  get different results in line2 and line 5. Why is that?  Additionally, I am also adding the helper function I use to convert from numpy to torch
def from_numpy_to_tensor(images,labels_list):

    images = torch.from_numpy(images).cuda()
    for label in labels_list:
        label["boxes"] = torch.from_numpy(label["boxes"]).cuda()
        label["labels"] = torch.from_numpy(label["labels"]).cuda()

    return images,labels_list