Issues related to the code for ROI pooling from the feature map
For the implementation of ROI pooling kindly refer to the following article...

https://medium.com/xplore-ai/implementing-attention-in-tensorflow-keras-using-roi-pooling-992508b6592b

https://deepsense.ai/region-of-interest-pooling-explained/