前馈网络的接收字段 [英] Receptive fields for feed forward network

查看:62
本文介绍了前馈网络的接收字段的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我对人工智能和神经网络非常陌生.我已经在PyTorch中实现了前馈神经网络,用于对MNIST数据集进行分类.现在,我想可视化隐藏神经元(子集)的感受野.但是我在理解接受域的概念时遇到了一些问题,当我用Google搜索时,所有结果都与CNN有关.那么,有人可以在PyTorch中如何做到这一点以及如何解释结果吗?

解决方案

我之前已经描述了CNN的接受域的概念在卷积层中,用于计算当前层的公式仅将图像的一部分作为输入(或至少仅基于此子区域更改结果).这正是接受领域.
现在,顾名思义,完全连接层具有从以前的隐藏状态到每个新的隐藏状态的连接,请参见图像下方:

在那种情况下,接收场只是以前的每个状态" (例如,在图像中,第一层绿松石中的一个单元受所有黄色单元的影响),乐于助人.整个想法是拥有一个较小的子集,而不是所有可用状态.

因此,不幸的是,我认为您对PyTorch中的实现问题并没有多大意义,但我希望答案仍能使该主题更加清晰.

作为后续,我还鼓励您考虑这种连接"的含义,尤其是在可调参数的数量方面.

I am pretty new to artificial intelligence and neural networks. I have implemented a feed-forward neural network in PyTorch for classification on the MNIST data set. Now I want to visualize the receptive fields of (a subset of) hidden neurons. But I am having some problems with understanding the concept of receptive fields and when I google it all results are about CNNs. So can anyone help me with how I could do this in PyTorch and how to interpret the results?

解决方案

I have previously described the concept of a receptive field for CNNs in this answer, just to give you some context that might be useful in my actual answer.

It seems that you are also struggling with the idea of receptive fields. Generally, you can best understand it by asking the question "which part of the (previous) layer representation is affecting my current input?"

In Convolutional layers, the formula to compute the current layer only takes part of the image as an input (or at least only changes the outcome based on a this subregion). This is precisely what the receptive field is.
Now, a fully connected layer, as the name implies, has a connection from every previous hidden state to every new hidden state, see the image below:

In that case, the receptive field is simply "every previous state" (e.g., in the image, a cell in the first turquoise layer is affected by all yellow cells), which is not very helpful. The whole idea would be to have a smaller subset instead of all available states.

Therefore, I think your question regarding implementations in PyTorch do not really make much sense, unfortunately, but I hope that the answer still provided some clarity on the topic.

As a follow-up, I also encourage you to think about the implications of this "connectedness", especially when it comes to the number of tunable parameters.

这篇关于前馈网络的接收字段的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆