Parse feature vector (Tensor)

Hello,

I am using CenterNet to train my model with non-square images of size (512, 1536). I am using this repository (CenterNet-plus/centernet_plus.py at main · yjh0410/CenterNet-plus · GitHub).

For this repository, however, (512, 512) images were used, and hence the step is done on Line 255 is valid, i.e. dividing by input_size which is 512.

My question is:
Because I have a non-square image I have a non-square feature map, [1, 128, 384, 2] (This is the output shape of the variable txty_pred (line 238) inside the aforementioned script). I would like to divide these values by the image size. Therefore, I want to divide the values inside “128” channel by 512 and values inside “384” channel by 1536. Does this make sense at all? If so, how can this be done?

Thank You.