Added flexible input image size for attention map visualization.
I was using this excellent repo. However, when I wanted to visualize the attention map, I noticed that visualize.py accepts just square input (but mine was rectangle). That is why I adjusted the attention map function: as it will get the dimensions of the height and width of the model input shape, then it will resize a given image to that input shape (not to a square).
Added flexible input image size for attention map visualization.
I was using this excellent repo. However, when I wanted to visualize the attention map, I noticed that visualize.py accepts just square input (but mine was rectangle). That is why I adjusted the attention map function: as it will get the dimensions of the height and width of the model input shape, then it will resize a given image to that input shape (not to a square).