I would like to implement a SSIM loss function, since the boarders are aborted by the convolution, I would like to preserve the boarders and compute L1 loss for the pixels of boarder. The code are learned from here. SSIM / MS-SSIM for TensorFlow
For example, we hava img1 and img2 size [batch,32,32,32,1], and the window_size of Guassian 11, the result ssim map will be [batch,22,22,22,1], L1 map [batch,32,32,32,1] how can I assign ssim to the center of the L1?
I receive error like this; TypeError: 'Tensor' object does not support item assignment