SongTang-x/SwinLSTM

why calculate 'MSE' or 'MAE' in axis=(0,1)? and what shape of output and every dimention means what?

nana1223 opened this issue · 1 comments

in utils.py:
def MAE(pred, true):
return np.mean(np.abs(pred - true), axis=(0, 1)).sum()

def MSE(pred, true):
return np.mean((pred - true) ** 2, axis=(0, 1)).sum()

thank you!!!!!!

hi,
1.Calculating 'MSE' and 'MAE' over axis=(0,1) for tensors shaped (B, S, C, H, W) averages the errors across all batch samples (B) and sequence steps (S). This method provides an aggregated error metric for B*S images in the batch, encompassing both individual samples and temporal aspects.
2.The resulting shape (C, H, W) corresponds to the number of channels (C) and the spatial dimensions of the images (height H and width W). This means that the resulting array provides a separate average error (either MAE or MSE) for each channel of the image.