How to visualise filters in a 1D CNN with PyTorch

Viewed 11

There are several good tutorials on how to visualize Filters and Feature Maps for 2D CNN (images) [1] [2]. However, I am yet to find an example on how the Filters and Feature Maps could be visualized/illustrated for 1D CNN (text).

Current thinking is to:

  • retrieve CNN weights and try to represent them as characters n-gram (equivalent of the 2D 8x8 kernels)
  • feed a text sample thru each model component and layer (in my case the model has 5 CNN modules) and try to represent them as a string (equivalent of 2D image transformation)

Any recommendation or advice is appreciated.

[1] https://machinelearningmastery.com/how-to-visualize-filters-and-feature-maps-in-convolutional-neural-networks/
[2] https://discuss.pytorch.org/t/visualize-feature-map/29597

0 Answers
Related