How to visualize each conv2 layer in resnet50

I am trying to visualize each conv2d layer in resnet50.
I found the blog and used to create the visuals for 1st layer (https://www.kaggle.com/daisukelab/verifying-cnn-models-with-cam-and-etc-fast-ai)

from sklearn.preprocessing import minmax_scale

def visualize_first_layer(learn):
conv1 = list(learn.model.children())[0][0]
weights = conv1.weight.data.cpu().numpy()
weights_shape = weights.shape
weights = minmax_scale(weights.ravel()).reshape(weights_shape)
fig, axes = plt.subplots(8, 8, figsize=(8,8))
for i, ax in enumerate(axes.flat):
ax.imshow(np.rollaxis(weights[i], 0, 3))
ax.get_xaxis().set_visible(False)
ax.get_yaxis().set_visible(False)

visualize_first_layer(learn)

But, I am not sure how to build it for other layers and I am not able to access them. I get following error:
bottleneck’ object is not subscriptable fastai