Hi,
I am looking to subtract two images, then flatten them and finally get an array with the pixel-wise differences between the two images.
How can I do this in Pytorch if the images are Tensors? I tried the following code but I get TypeError: bad operand type for abs(): ‘torch.FloatTensor’.
diff_S = np.abs(np.array(test_output.data[0]) - np.array(test_secret.data[0]))
Where test_output and test_secret are the two images.
Thanks in advance!
Francisco