Lesson 6, how show_heatmap function works?

In lesson 6, in show_heatmap() function how does it know to make a right transformation from 11x11 shape of condensed last convolutional level to 352x352 shape of original picture?
Which basically what is interesting to us in this Heatmap technique.

For this you’ve got option: extent in the imshow function. Instead of size 11x11 you’ve got size 352x352. It will resize the image to the correct one. 11x11 is a squashed original image.

extent : scalars (left, right, bottom, top), optional

ax.imshow(hm, alpha=0.6, extent=(0,352,352,0),
              interpolation='bilinear', cmap='magma');

https://matplotlib.org/api/_as_gen/matplotlib.pyplot.imshow.html