(1, 10)
layer_names = list(activations.keys())
activation_maps = list(activations.values())
batch_size = activation_maps[0].shape[0]
assert batch_size == 1, "One image at a time to visualize."
for i, activation_map in enumerate(activation_maps):
print("Displaying activation map {}".format(i))
After Change
(1, 128)
(1, 10)
for name, activation_map in activations.items():
assert activation_map.shape[0] == 1, "One image at a time to visualize."
print("Displaying activation map [{}]".format(name))
shape = activation_map.shape