Every feature map in a CNN answers one question about the image, such as "is there fur here?" or "is there a wheel-like shape here?". Not every question matters equally for every photo. A squeeze-and-excitation block lets the network turn some feature maps up and others down, depending on the image in front of it. It is built from pieces you already know:
Task: write reweight_maps(maps, w_down, w_up).
maps is a list of feature maps. Each map is a grid (a list of rows), and all maps have the same height and width.w_down has one row per hidden unit , and each row holds weights: w_down[k][i] is .w_up has one row per feature map , and each row holds one weight per hidden unit: w_up[i][k] is .maps, with every value rounded to 4 decimal places.