Questions tagged [activation-function]

Activation function is a non-linear transformation, usually applied in neural networks to the output of the linear or convolutional layer. Common activation functions: sigmoid, tanh, ReLU, etc.

Filter by
Sorted by
Tagged with
0 votes
1 answer
11 views

Why is the optimal output out of domain in A2C?

If each state has an optimal action, then the optimal actions distribution vector is a one-hot vector kind of like [0,0,1,0,0,0]. But with algorithms like A2C, we ...
0 votes
0 answers
12 views

separate activation layer vs activation in same layer

Can someone tell me if both of these code behave same or there is some difference using activation layer separately compared to specifying the function within same layer definition: ...
0 votes
0 answers
15 views

Sigmoid Activation Function (Output layer) Alternative

I have a Convolutional-VAE architecture where the target images are in the range [0, 1], their pixel values. To synthesize/reconstruct images in this scale, I am using a sigmoid activation function in ...
  • 121
0 votes
0 answers
8 views

What's the intuition behind self-regularized activation function?

The meaning of self-regularization for activation functions is not clear to me. What's the intuition behind it? How does the lower boundedness of an activation function provide strong regularization ...
  • 3
0 votes
0 answers
14 views

What's the advantage of upper boundedness of an activation function?

If upper boundedness could lead to problems on saturation, why is using bounded functions like sigmoid and tanh still common? What's the advantage of upper bounded activation functions over unbounded ...
  • 3
0 votes
1 answer
22 views

Is it possible to tell if one activation function is better than the other one based on their graphs?

I am attempting to formulate my own activation function. However, I'm new to neural networks, am not yet ready to test it, but would want to know if I already landed on a better activation function ...
  • 3
0 votes
1 answer
51 views

CNN model why is ReLu used in Conv1D layer and in the first Dense Layer?

I have a problem. I have a CNN model which is used for an NLP problem. This is written in Python. I have questions about this, which I can't find an answer to. Why is ReLu used inside the Conv1D ...
  • 89
2 votes
1 answer
36 views

Question about non linearity of activation function

I have a basic question about activation functions. It is told that they are added to the network to introduce non linearity. However, the neural network itself is non linear. Isn' it? If we see any ...
6 votes
1 answer
79 views

What is the advantage of using Euler's number (e^x) instead of another base in the softmax equation?

I understand the softmax equation is $\boldsymbol{P}(y=j \mid x)=\frac{e^{x_{j}}}{\sum_{k=1}^{K} e^{x_{k}}}$ My question is: why use $e^x$ instead of say, $3^x$. I understand $e^x$ is it's own ...
0 votes
0 answers
8 views

In DNN if layers use different activation functions do they need to use different weight initializers?

I've read that 'he' weight initialization goes well with Relu activation function (including elu, leakyRelu, etc...) and 'glorot' weight initialization goes well with tanh, and sigmoid. If I am ...
  • 385
0 votes
0 answers
22 views

Difficulty of training deep neural networks

While training neural networks I'm trying to debug what is wrong however not sure what to look at. From paper "Understanding the difficulty of training deep feedforward neural networks" by ...
  • 385
0 votes
2 answers
126 views

If sigmoid activation function is prone to vanishing and exploding gradients can we not use it in final layer of binary classfication?

Many paper and books say that sigmoid activation function with random intialization is prone to vanishing/exploding gradients therefore it is better to use LeakyRelu, Elu, or Relu. Does this mean that ...
  • 385
0 votes
1 answer
52 views

Training deep neural networks with ReLU output layer for verification

Most algorithms for verification of deep neural network require ReLU activation functions in each layer (e.g. Reluplex). I have a binary classification task with classes 0 and 1. The main problem I ...
1 vote
0 answers
81 views

Performance comparison of different activation functions

I was trying to find a way to compare the test accuracy and test loss of different activation functions (such as tanh, sigmoid, relu), so I came up with this script: ...
0 votes
0 answers
7 views

What is meant by softly selecting a matrices from a set of matrices?

How is the softmax layer applied to the 1x1 conv layer in order to soflty select the matrix from a set of matrix denoted by A. From my understanding of convolutions, implementing a 1x1 conv layer on a ...
1 vote
0 answers
36 views

Intuitively, why do Non-monotonic Activations Work?

The swish/SiLU activation is very popular, and many would argue it has dethroned ReLU. However, it is non-monotonic, which seems to go against popular intuition (at least on this site: example 1, ...
  • 33
0 votes
0 answers
9 views

why zero centring of data from activation function is good for deep nural network?

I was reading an article that mentioned reasons why tanh is better than sigmoid and one reason was that tanh gives zero-centered data but I couldn't understand why and how it will affect our network. ...
0 votes
0 answers
29 views

Multioutput Neural Network for function approximation

I am trying to extend the example here to be capable of handling multiple outputs for function approximations ...
0 votes
1 answer
16 views

Activation Functions in Haykins Neural Networks a comprehensive foundation

In Haykins Neural Network a comprehensive foundation, the piecwise-linear funtion is one of the described activation functions. It is described with: The corresponding shown plot is I don't really ...
0 votes
1 answer
60 views

Why does using tanh worsen accuracy so much?

I was testing how different hyperparameters would change the output of my multilayer perceptron for a regression problem ...
3 votes
4 answers
1k views

Neural Network not Deep

I have found this image link I would like to know what NNs are not deep neural? The first three? Also what kind of functional activations do they use?
  • 471
0 votes
0 answers
56 views

Why using the hyperbolic tangent or the sigmoid as activation function on the last layer gaves the same result in accuracy?

The problem I'm making a simple Multilayer Perceptron (MLP), in Keras, that has to do the binary classification from some float type of data. Each single data is a group of three float values (e.g. 32....
  • 1
0 votes
0 answers
14 views

Activation maps positive even before activation

I was looking at the activation maps of vgg19 in pytorch. I found that all the values of the maps are positive even before I applied the ReLU. This seems very strange to me... If this would be correct ...
1 vote
1 answer
193 views

How to prove Softmax Numerical Stability?

I was playing around with the softmax function and tried around with the numerical stability of softmax. If we increase the exponent in the numerator and denominator with the same value, the output of ...
0 votes
0 answers
16 views

What happens if you don't include any activation function on hidden classification layers?

What happens if we don't apply an activation function to the classification hidden layers and apply it only for the final output layer (Sigmoid, Softmax)? I'm asking this because I have trained a CNN ...
0 votes
2 answers
49 views

Is there any point in having layers in a neural network for regression problems?

In my textbook I read that an MLP and linear activation functions for the hidden layers can be reduced to a simple input-output system, i.e. no hidden layers. This makes sense to me. Later on I read ...
0 votes
0 answers
17 views

Feature importance by removing all other features?

For neural network feature importance, can I zero-out all features except one in order to gauge that feature's importance? I know shuffling a feature is one approach. For example, leaving in the 4th ...
  • 478
0 votes
2 answers
88 views

Activation and Loss Function not chosen correctly when use Neural Network

I have three classes for my text dataset before. These are my classes: 0 = Cat 1 = Not Both 2 = Dog Then I use this code: ...
  • 13
2 votes
0 answers
22 views

Derive backpropagation for PreLU

I want to derive the back propagation functions for the Parametric Relu activation function which is defined as follows: $$ h_a(x) = \text{max}(ax, x) $$ I want to derive $ \frac{\partial L}{\partial ...
  • 21
1 vote
0 answers
26 views

What meaning does exp function have? [closed]

Is there any problem that solution(or algorithm) would be exp function? Let's say f(x)=2^x. It's an answer of a problem when you would like to know how many pieces would be made when you fold a paper ...
  • 21
1 vote
0 answers
22 views

The case of (1,478) dim and parameters of neural network to find out

colleagues, actually I am kind'a new to NN, but hard trying.. I have data: Index: 40073 entries (excluded from training, UID) Columns: 484 entries dtypes: bool(468), float64(2), int64(13), object(1) I ...
8 votes
2 answers
2k views

Why deep learning models still use RELU instead of SELU, as their activation function?

I am a trying to understand the SELU activation function and I was wondering why deep learning practitioners keep using RELU, with all its issues, instead of SELU, which enables a neural network to ...
5 votes
1 answer
8k views

Difference between ReLU, ELU and Leaky ReLU. Their pros and cons majorly

I am unable to understand when to use ReLU, ELU and Leaky ReLU. How do they compare to other activation functions(like the sigmoid and the tanh) and their pros and cons.
1 vote
0 answers
84 views

Word embedding autoencoder

I'm trying to train a word embedding autoencoder, but it either doesn't train, or trains but doesn't make predictions. I know I'm doing something wrong, so any help is greatly appreciated. Here is my ...
1 vote
1 answer
81 views

Activation Function

I am very new to machine learning and made an experiment myself. I have a few questions: Can I use $Y = sin(x)$ or $Y = 2x$ as an activation function for a neural network? Is it necessary to increase ...
  • 13
1 vote
2 answers
82 views

How can the ReLU function lead to convergence?

The gradient descent algorithm is based on the fact that the gradient decreases as we move towards the optimum point. However, in the activations by the ReLU ...
1 vote
0 answers
95 views

If the input to the autoencoder is normalized, do we need to use sigmoid on the last layer?

According to: https://stackoverflow.com/questions/65307833/why-is-the-decoder-in-an-autoencoder-uses-a-sigmoid-on-the-last-layer The last layer activation function contains sigmoid in order to the ...
1 vote
1 answer
113 views

Is there comprehensive list of activation functions and their applications for a Neural Network?

I am aware of common activation functions like sigmoid, tanh,ReLu, Leaky ReLu. Even heard about a function called Swish. Now is there any detailed information on other activations functions and some ...
1 vote
1 answer
63 views

Can this dataset be separated linearly?

Is this dataset linearly separable? If not, can it be converted into one by applying some function as it seems to follow the same pattern? Also, which classification algorithms could be used to fit ...
  • 13
2 votes
1 answer
3k views

How batch normalization layer resolve the vanishing gradient problem?

According to this article: https://towardsdatascience.com/the-vanishing-gradient-problem-69bf08b15484 The vanishing gradient problem occurs when using the sigmoid ...
0 votes
1 answer
300 views

Why the gradient of a ReLU for X>0 is 1?

Gradient is derivative of several variables. I can't understand why is the gradient of a ReLU for X>0 is 1 ? and 0 for x < 0 ? I tried to search for proof and examples but didn't found any good ...
  • 277
1 vote
1 answer
42 views

Training set Distribution and Activation function/Loss function correlation

How should the probability distribution of the training set influence the choice of the activation function / loss function? For instance if I have a Multinoulli distribution, which activation ...
2 votes
1 answer
78 views

Do Activation Functions map to Higher Dimensions?:

I just started learning tensorflow and I have a question regarding activation functions used in neural networks, I watched a 3b1b video a while ago and it seems it squished the value into an interval ...
0 votes
1 answer
142 views

Numerically stable hyperbolic tangent

The hyperbolic tangent is commonly used as an activation function: $$ tanh(x) = \frac{e^x - e^{-x}}{e^x + e^{-x}} $$ Although, it is unclear how this function is implemented to be numerically stable ...
  • 153
0 votes
1 answer
116 views

Applying activation on part of the layer in Keras

Context I am trying to implement the YOLO algorithm in Keras. What I have so far is the following network: ...
0 votes
1 answer
66 views

Is it possible to implement a vectorized version of a Maxout activation function?

I want to implement an efficient and vectorized Maxout activation function using python numpy. Here is the paper in which "Maxout Network" was introduced (by Goodfellow et al). For example, ...
  • 103
0 votes
1 answer
104 views

Input and output layer activation functions of neurons in Orange

What are the activation functions of the neurons in the input and output layer of a neural network model from the Orange machine learning application?
  • 1
0 votes
1 answer
20 views

Can there be in-active neuron in output layer

I am new to deep learning, and was studying about it. I know that input from input layer is multiplied with weights and then added with bias. And output of this is passed to a activation function of a ...
1 vote
0 answers
18 views

Does the number of hidden layers affect the activation function?

Suppose there's a network with N hidden layers. There are 2 cases: The network is deep The network is shallow I've been wondering how ...
  • 11
0 votes
0 answers
119 views

tanh function values are either 1 or -1, how to interpret that distribution

I have a question regarding the tanh function. I trained an NN (with tanh activation functions in hidden layers) on a multiclass dataset and visualised the tanh values of the complete samples from the ...
  • 83