Skip to main content

Questions tagged [relu]

For questions about the rectified linear unit (ReLU) or rectifiers, which is a widely used activation function in neural networks.

Filter by
Sorted by
Tagged with
0 votes
0 answers
16 views

why CAM does not use ReLU, unlike Grad-CAM?

I learned that Grad-CAM uses ReLU becuase it is only interested in positive incluence on the class of interest. Then I think ReLU can also be used to CAM. But why they don't use ReLU?
COTHE's user avatar
  • 11
0 votes
0 answers
13 views

Simplifying equation with maximum inside absolute sign

This is the formula I am working on. $|a\times \max(x,0)+b\times \max(y,0)+c \times \max(z,0)|$ Is it possible to take the maximum out of the absolute sign?
Xiaoyang Li's user avatar
0 votes
0 answers
23 views

How does the relu nonlinearity allow for nonlinear polynomial transformations?

Since the neural network nonlinearities allow for nonlinear transformations that can stretch and squish the function, how can the ReLU activation function do this? I think for the sigmoid nonlinearity ...
Vivek Reddy's user avatar
2 votes
0 answers
41 views

What's the result of multiple neurons using ReLU activation function?

This question comes from a doubt that I recently had on an amazing book called "Neural Networks from Scratch With Python by Harrison Kinsley & Daniel Kukieła" Let's suppose that I have ...
Tomorrow's user avatar
0 votes
0 answers
13 views

How are groups created in maxout units when dividing the set of inputs 𝑧 into groups of 𝑘 values?

I don't get $G^(i)$the set of indices into the inputs for group $i$, $\{(i −1)k+ 1, . . . , ik\}$ when creating a maxout units/function, these thing that outputs the maximum element of groups: $$g(z)...
Revolucion for Monica's user avatar
1 vote
2 answers
2k views

Why does Batch-Normalization before ReLU work?

I have read a little about Batch-Normalization and I understood that there isn't any better option on where you place Batch-Normalization (it all depends on the case). However, I don't understand the ...
Bliscor's user avatar
  • 11
2 votes
1 answer
327 views

How does gradient descent work with relu if weights are negative?

How does gradient descent work with relu, imagine the weights are quite negative and so our "prediction" is 0, then not much is learned. Is there a risk that training gets stuck when weights ...
Dirk N's user avatar
  • 158
1 vote
1 answer
98 views

Since ReLU activations also result in a sparse network, does it have the same "feature selection" property as L1 regularization?

From Deep Learning (Courville, Goodfellow, Bengio), a ReLU activation often "dies" because One drawback to rectified linear units is that they cannot learn via gradient based methods on ...
rac.coon's user avatar
1 vote
0 answers
144 views

Neural network and logical gates

I have a network witch consist of two fully connected layers (without bias) and a ReLu function in between. The network input is two binary numbers, and the output should be the a logical gate result: ...
Daniel's user avatar
  • 131
2 votes
1 answer
723 views

Why cannot linear activation functions be used to approximate any function?

In neural networks we use nonlinear activation functions such as sigmoid, ReLU, etc. Using a combination of these functions (with required scaling and shifting), we manage to estimate any nonlinear ...
levitatmas's user avatar
2 votes
1 answer
242 views

Why and when do we use ReLU over tanh activation function?

I was reading LeCun Efficient Backprop and the author repeated stressed the importance of average the input patterns at 0 and thus justified the usage of tanh sigmoid. But if tanh is good then how ...
Struggling_In_Final's user avatar
0 votes
1 answer
82 views

Where does the "rectified" in ReLU come from?

ReLU stands for Rectified Linear Unit. Linear Unit, I understand, since the function is piecewise linear. But what does rectified mean? I looked up the definition and it said: denoting an electric ...
a6623's user avatar
  • 123
1 vote
1 answer
313 views

Does it make sense to provide a DQN with negative rewards for a network with relu and sigmoid activations?

The creation of negative rewards leads to the chance of Q-values being negative. However, networks with relu or sigmoid activations, just cannot predict negative values. This will lead to a case where ...
desert_ranger's user avatar
0 votes
1 answer
103 views

What is meant by non-linearity in Convolutional Neural Networks? And why do we focus on removing it entirely? [closed]

I'm aware of the working of ReLU that it's turns every negative value to zero and doesn't effect any positive value, but what confuses me is that: what is actually meant by Non-linearity in feature ...
Sharjeel M. Rajput's user avatar
-1 votes
1 answer
224 views

Are any non-injective activation functions used?

All activation functions I know of are injective, which I think makes sense. But are there cases where non-injective activations can be useful?
Moritz Groß's user avatar
1 vote
2 answers
2k views

Effects of ReLU Activation on Convexity of Loss Functions

I have heard the following argument being made regarding Neural Networks: A Neural Network is a composition of several Activation Functions Sigmoid Activation Functions are Non-Convex Functions The ...
stats_noob's user avatar
1 vote
0 answers
136 views

What are Linear and Non-Linear Features of an image in the context of Convolutional Neural Network?

What features of image are linear or non-linear, any example ?
Shuai Xu's user avatar
4 votes
1 answer
1k views

Why should one ever use ReLU instead of PReLU?

To me, it seems that PReLU is strictly better than ReLU. It does not have the dying ReLU problem, it allows negative values and it has trainable parameters (which are computationally negligible to ...
algebruh's user avatar
0 votes
1 answer
119 views

Why the partial derivative is $0$ when $F_{ij}^l < 0$?. Math behind style transfer

I am currently in the process of reading and understanding the process of style transfer. I came across this equation in the research paper which went like - For context, here is the paragraph - ...
HarshDarji's user avatar
1 vote
0 answers
57 views

ReLU function converging to local optimum in one case and diverging in the other one

I implemented a simple neural network with 1 hidden layer. I used ReLU as activation function for the hidden layer and the output layer just uses the linear function. To check my implementation I ...
SAGALPREET SINGH's user avatar
2 votes
0 answers
110 views

Can Neural Networks using ReLU activation work without using the bias term in their neurons?

I created a super simple NN of 1 input, 2 hidden layers of 2 neurons each and 1 output neuron as shown below. All activations are ReLUs and neurons doesn't use the bias term. What I found is that the ...
Manu Soman's user avatar
0 votes
1 answer
63 views

How to explain that a same DNN model have radically different behaviours with each new initialization and training?

I'm trying to predict the continuous values of a variable $y$ using a Fully Connected Neural Network while providing it with data from a $(3300, 13)$ matrix $X$ where $X[i, :]=[0,...,1,...,0,x_{i}]$. ...
Daviiid's user avatar
  • 575
6 votes
2 answers
1k views

Why is tf.abs non-differentiable in Tensorflow?

I understand why tf.abs is non-differentiable in principle (discontinuity at 0) but the same applies to tf.nn.relu yet, in case of this function gradient is simply set to 0 at 0. Why the same logic is ...
zedsdead's user avatar
1 vote
0 answers
138 views

What are the benefits of using ELU over other activation functions in CNNs?

I have come up with some examples of CNNs (segmentation CNNs) that use ELU (exponential linear unit) as an activation function. What are the benefits of this activation function over others, such as ...
IgnacioGaBo's user avatar
0 votes
1 answer
860 views

How is the performance of a model affected by adding a ReLU to fully connected layers?

How significant is adding a ReLU to fully connected (FC) layers? Is it necessary, or how is the performance of a model affected by adding ReLU to FC layers?
sai_varshittha's user avatar
2 votes
0 answers
360 views

How to decide if gradients are vanishing?

I am trying to debug a convolutional neural network. I am seeing gradients close to zero. How can I decide whether these gradients are vanishing or not? Is there some threshold to decide on vanishing ...
pramesh's user avatar
  • 121
0 votes
2 answers
2k views

Is it possible to have a negative output using only ReLU activation functions, but not in the final layer?

I know that if you use an ReLU activation function at a node in the neural network, the output of that node will be non-negative. I am wondering if it is possible to have a negative output in the ...
anonuser01's user avatar
3 votes
1 answer
257 views

Can residual neural networks use other activation functions different from ReLU?

In many diagrams, as seen below, residual neural networks are only depicted with ReLU activation functions, but can residual NNs also use other activation functions, such as the sigmoid, hyperbolic ...
jr123456jr987654321's user avatar
4 votes
0 answers
2k views

Should batch normalisation be applied before or after ReLU?

I know that there has been some discussion about this (e.g. here and here), but I can't seem to find consensus. The crucial thing that I haven't seen mentioned in these discussions is that applying ...
Kris's user avatar
  • 171
1 vote
1 answer
116 views

If features are always positives, why do we use RELU activation functions?

When does it happen that a layer (either first or hidden) outputs negative values in order to justify the use of RELU? As far as I know, features are never negative or converted to negative in any ...
sujeto1's user avatar
  • 129
2 votes
1 answer
134 views

Does net with ReLU not learn when output < 0?

The derivative of ReLU is 0 if its output is lower than 0 - $d ReLU(x)/dReLU$ is $0$ if $x < 0$. Let's denote some net's output by $Out$, so if this net's last layer is ReLU then we get that $dOut/...
Gilad Deutsch's user avatar
4 votes
1 answer
917 views

Neural network doesn't seem to converge with ReLU but it does with Sigmoid?

I'm not really sure if this is the sort of question to ask on here, since it is less of a general question about AI and more about the coding of it, however I thought it wouldn't fit on stack overflow....
finlay morrison's user avatar
1 vote
0 answers
57 views

Why do DeconvNet use ReLU in the backward pass?

Why does DeconvNet (Zeiler, 2014) use ReLU in the backward pass (after unpooling)? Are not the feature maps values already positive due to the ReLU in the forward pass? So, why do the authors apply ...
volperossa's user avatar
1 vote
1 answer
351 views

Are PreLU and Leaky ReLU better than ReLU in the case of noisy labels?

Let's assume I want to build a semantic segmentation algorithm, based on Multires-UNET. My GT-masks are messy and generated by a GAN, but they are getting better and better over time. The goal is ...
Paul Higazi's user avatar
2 votes
2 answers
574 views

Is ReLU a non-linear activation function?

According to this blog post The purpose of an activation function is to add some kind of non-linear property to the function The sigmoid is typically used as an activation function of a unit of a ...
slowmonk's user avatar
  • 151
2 votes
2 answers
558 views

How to determine the target value when using ReLU as activation function?

Consider the following simple neural network with only one neuron. The input is $x_1$ and $y_2$, where $-250 < x < 250$ and $-250 < y < 250$ The weights of the only neuron are $w_1$ and $...
Alan Vinícius's user avatar
6 votes
2 answers
2k views

In deep learning, is it possible to use discontinuous activation functions?

In deep learning, is it possible to use discontinuous activation functions (e.g. one with jump discontinuity)? (My guess: for example, ReLU is non-differentiable at a single point, but it still has a ...
Gyeonghoon Ko's user avatar
0 votes
1 answer
1k views

Network doesn't converge with ReLU or Leaky ReLU, but works well with sigmoid/tanh

I have these training data to separate, the classes are rather randomly scattered: My first attempt was using tf.nn.relu activation function, but output was stuck ...
Dan D.'s user avatar
  • 1,293
4 votes
2 answers
936 views

Is PReLU superfluous with respect to ReLU?

Why do people use the $PReLU$ activation? $PReLU[x] = ReLU[x] + ReLU[p*x]$ with the parameter $p$ typically being a small negative number. If a fully connected layer is followed by a at least two ...
Robert Nowak's user avatar
2 votes
2 answers
305 views

Dropout causes too much noise for network to train

I am using dropout of different values to train my network. The problem is, dropout is contributing almost nothing to training, either causing so much noise the error never changes, or seemingly ...
Recessive's user avatar
  • 1,396
2 votes
0 answers
245 views

How is the bias caused by a max pooling layer overcome?

I have constructed a CNN that utilizes max-pooling layers. I have found with these layers that, should I remove them, my network performs ideally with every output and gradient at each layer having a ...
Recessive's user avatar
  • 1,396
3 votes
1 answer
463 views

How are exploding numbers in a forward pass of a CNN combated?

Take AlexNet for example: In this case, only the activation function ReLU is used. Due to the fact ReLU cannot be saturated, it instead explodes, like in the following example: Say I have a weight ...
Recessive's user avatar
  • 1,396
0 votes
2 answers
881 views

How should the values of the filters of a CNN change?

I wrote a convolutional neural network for the MNIST dataset with Numpy from scratch. I am currently trying to understand every part and calculation. But one thing I noticed was the "just positive" ...
jutu OOtv's user avatar
3 votes
1 answer
630 views

How does backpropagation with unbounded activation functions such as ReLU work?

I am in the process of writing my own basic machine learning library in Python as an exercise to gain a good conceptual understanding. I have successfully implemented backpropagation for activation ...
Archie Shahidullah's user avatar
1 vote
1 answer
533 views

Is there a ReLU-like activation function that concatenates positive and negative values?

Is there a ReLU-like activation function that concatenates positive and negative values? What is its name? Apparently, it doubles the output dimension.
Andrew Matiuk's user avatar
9 votes
1 answer
4k views

What happens when I mix activation functions?

There are several activation functions, such as ReLU, sigmoid or $\tanh$. What happens when I mix activation functions? I recently found that Google has developed Swish activation function which is (...
JSChang's user avatar
  • 93
23 votes
1 answer
29k views

What are the advantages of ReLU vs Leaky ReLU and Parametric ReLU (if any)?

I think that the advantage of using Leaky ReLU instead of ReLU is that in this way we cannot have vanishing gradient. Parametric ReLU has the same advantage with the only difference that the slope of ...
gvgramazio's user avatar
11 votes
2 answers
8k views

Why do we prefer ReLU over linear activation functions?

The ReLU activation function is defined as follows $$y = \operatorname{max}(0,x)$$ And the linear activation function is defined as follows $$y = x$$ The ReLU nonlinearity just clips the values ...
imflash217's user avatar
13 votes
1 answer
3k views

How exactly can ReLUs approximate non-linear and curved functions?

Currently, the most commonly used activation functions are ReLUs. So I answered this question What is the purpose of an activation function in neural networks? and, while writing the answer, it struck ...
user avatar
1 vote
3 answers
6k views

What is the derivative of the Leaky ReLU activation function?

I am implementing a feed-forward neural network with leaky ReLU activation functions and back-propagation from scratch. Now, I need to compute the partial derivatives, but I don't know what the ...
Mike AI's user avatar
  • 145