Visualization of activation for LSTM
2 次查看(过去 30 天)
显示 更早的评论
Like deepDreamImage for CNN layers visualization, is there any approach to check/analyze activations of a LSTM layer into MATLAB ?
My workaround for now is to change my TS to image and then check activations, but it is not perfect.
2 个评论
Stuart Whipp
2018-12-10
Hi,
I recently posted this for yielding activations from an LSTM network.
Simply copy into a .m file (or save attachment) and call as per the usual activation function (specifying layer as a number rather than by name). The basic premise is to slice the end of your network, and place a regression output just after the layer of interest. This will show activations of specified layer as they would be passed to a subsequent layer during 'normal operation
This should work for all SeriesNetworks, I don't think it would work for a DAGnetwork but could amend it to work surely.
Cheers
Stuart
Stuart Whipp
2018-12-10
编辑:Stuart Whipp
2018-12-10
Incidentally, LSTM doesn't work with DAG anyway. I think this is exactly what you're looking for in terms of activations from LSTM/BiLSTM. It's not the same thing as 'deepDreamImage' of course, but the usual 'activations' function which I'm sure you've realised only works for non recurrent networks.
As I understand, DeepDream is like saying 'what change to the inputs would make the activation more pronounced upon this layer/channel'. In this manner, we can show the net a picture of a cat and ask what change to said input would make the network assume the answer was say, chicken? Pareidolia
Wikipedia actually gives a good overview. It's essentially running a layer backwards to reverse engineer a desired output. It results in trippy images where small artefacts are overprocessed to produce what look like chicken features on our original cat image.
回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Data Workflows 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!