简体   繁体   English

激活层学习什么?

[英]What activation layers learn?

I am trying to figure out what CNN architecture after every activation layers.我试图弄清楚每个激活层之后的 CNN 架构。 Therefore, I have written a code to visualize some activation layers in my model.因此,我编写了一个代码来可视化我模型中的一些激活层。 I used LeakyReLU as my activation layer.我使用 LeakyReLU 作为我的激活层。 This is the figure LeakyRelu after Conv2d + BatchNorm这是Conv2d + BatchNorm后的LeakyRelu图

As can be seen from the figure, there are quite purple frames, which shows nothing.从图中可以看出,有相当紫色的边框,没有任何显示。 So my question is what does it mean.所以我的问题是它是什么意思。 Does my model learn anything?我的模型能学到什么吗?

Generally speaking, activation layers (AL) don't learn.一般来说,激活层 (AL) 不会学习。 The purpose of AL is to add non-linearity into the model, hence they usually apply a certain, fixed, function regardless of the data, without adapting with the data. AL 的目的是在模型中添加非线性,因此它们通常应用特定的、固定的函数而不考虑数据,而不是适应数据。 As an example:举个例子:

  1. Max Pool : take the highest number in the region Max Pool : 取区域内最大的数
  2. Sigmoid/Tanh : put the all the numbers through a fixed computation Sigmoid/Tanh :将所有数字通过固定计算
  3. ReLU : takes the max between the numbers and 0 ReLU :取数字和 0 之间的最大值

I tried to simplify the math, so pardon my inaccuracies.我试图简化数学,所以请原谅我的不准确之处。 As a closure, your purple frames are probably filters that didn't learn just yet, train the model to convergence and unless your model is highly bloated (too big for your data) your will see 'structures' in your filters.作为一个闭包,您的紫色框架可能是尚未学习的过滤器,训练模型以使其收敛,除非您的模型非常臃肿(对于您的数据来说太大),否则您将在过滤器中看到“结构”。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 如果我们不将激活应用于前馈神经网络的隐藏层而仅应用于输出层怎么办? - What if we do not apply activation to the hidden layers and only to the output layer of a feed forward neural network? 隐藏层之间的深度学习激活功能? - Deep learning activation function between hidden layers? 深度学习的最佳做法,在各层中使用相同的激活 - Best practices in deep learning to use the same activation throughout the layers Class 激活热 map。 ValueError:您正在尝试将包含 15 层的权重文件加载到具有 16 层的 model 中 - Class activation heat map. ValueError: You are trying to load a weight file containing 15 layers into a model with 16 layers ImagePairData层在Caffe中意味着什么? - what ImagePairData layers means in Caffe? EfficientNetB2 的层数是多少? - what is the number of layers in EfficientNetB2? tensorflow中cudnnlstm的默认激活函数是什么 - What is the default activation function of cudnnlstm in tensorflow Keras - 使用 tf.keras.layers.Dense(1,activation='sigmoid')(x) 时指定 from_logits=False - Keras - Specifying from_logits=False when using tf.keras.layers.Dense(1,activation='sigmoid')(x) 为什么在线性层之后使用 ReLu 激活时精度会降低 - why does the Accuracy decrease when using a ReLu activation after Linear layers 如何在训练 Keras 功能 API model 时打印不同激活层的准确性? (张量流Python) - How to print accuracy of different activation layers while training a Keras functional API model? (Tensorflow Python)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM