albanD:

max = max * torch.tensor([[[1920,], [1200,], [200,]],])


sorry the solution is wrong, I still get the inplace error.
I think this no-inplace constraint targets the  tensor which is forward along the model, only this tensor needs back-propagation, so you can’t change it. But in my code the “max” tensor is just a tensor.