Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [loss-functions]

The tag has no usage guidance.

1
vote
0answers
5 views

How is equation 8 derived in the paper “Self-critical sequence training for image captioning”?

In the paper "Self-critical sequence training for image captioning", on page 3, they define the loss function (of the parameters $\theta$) of an image captioning system as the negative expected reward ...
0
votes
0answers
10 views

Loss function spikes

For the UNSW-NB15 dataset i receive spikes in the loss function during training. The algorithms see part of this UNSW dataset a single time. Loss function is plotted after every batch. For other ...
1
vote
1answer
41 views

How to obtain a formula for loss, when given an iterative update rule in gradient descent?

From the reinforcement learning book section 13.3: Using pytorch, I need to calculate a loss, and then the gradient is calculated internally. How to obtain the loss from equations which are stated ...
0
votes
0answers
33 views

What are the practical and theoretical properties that commonly used loss functions have?

What are the practical and theoretical properties that commonly used loss functions have (in particular, in the context of neural networks)?
-1
votes
0answers
15 views

Constant in Loss Function of Style Transfer

After I read paper by Gatys, Image Style Transfer Using Convolutional Neural Networks, I notice there aren't any explanations for the constant in Eq. (4): $$E_l = \frac{1}{4N_l^2M_l^2}\sum_{i,j}(G_{...
0
votes
1answer
45 views

inconsistent formulas for loss calculation in OpenAI's Actor Critic?

Open Ai's (working) actor critic code calculates the losses like so: ...
2
votes
1answer
39 views

Comparing and studying Loss Functions

I have a Deep Feedforward Neural Network $F: W \times \mathbb{R}^d \rightarrow \mathbb{R}^k$ (where $W$ is the space of the weights) with $L$ hidden layers, $m$ neurones per layer and ReLu activation. ...
1
vote
0answers
23 views

Dice loss gives binary output whereas binary crossentropy produces probability output map

On recommendation of Kanak on stackoverflow I am posting this question here: Currently I am experimenting with various loss functions and optimizers for my binary image segmentation problem. The loss ...
1
vote
1answer
41 views

How do I calculate $max_{a′}Q(s′,a′,w−)$ when it is represented as a neural network?

Consider the following loss function $$ L(\mathbf{w}) = [(r + \gamma max_{a'} Q(s', a', \mathbf{w^-})) - Q(s, a, \mathbf{w})]^2 $$ where $Q(s, a, \mathbf{w^-})$ and $Q(s, a, \mathbf{w})$ are ...
1
vote
2answers
222 views

What is the derivative function used in backpropagration?

I'm learning AI, but this confuses me. The derivative function used in backpropagation is the derivative of activation function or the derivative of loss function? These terms are confusing: ...
0
votes
1answer
31 views

SSE involving power of 2 eliminates negative gradient?

I think I missunderstood something when it comes to the SSE (= sum of squared errors) as a loss function. So: the formula for the SSE is: But, if ti - oi is negative, doessn't the power of 2 ...
1
vote
1answer
23 views

Training by one batch of examples, what does it mean

Say I have a batch of examples, each examples represent a state: ...
0
votes
2answers
176 views

Can the value of a cost function be negative?

I'm new to machine learning and I was watching a video about gradient descent.It said that we want our cost function(Mean squared error) to have the minimum value but that minimum value shown in the ...
1
vote
1answer
74 views

Chess policy network

I am interested in making a simple chess engine using neural networks. I already have a fairly good value network but I can't figure out how to train a policy network. I know that Leela chess zero ...
1
vote
0answers
24 views

How to understand marginal loglikelihood objective function as loss function (explanation of an article)?

I am reading article https://allenai.org/paper-appendix/emnlp2017-wt/ http://ai2-website.s3.amazonaws.com/publications/wikitables.pdf about training neural network and the loss function is mentioned ...
4
votes
1answer
45 views

How to define a loss function for a classifier where the confusion between some classes is more important than the confusion between others?

I have a dataset of images belonging to $N$ classes, $A_1, A_2...A_n,B_1,B_2...B_m$ and I want to train a CNN to classify them. The classes can be considered as subclasses of two broader classes $A$ ...
2
votes
1answer
102 views

Gradient of hinge loss function

With reference to the research paper entitled Sentiment Embeddings with Applications to Sentiment Analysis, I am trying to implement its sentiment ranking model in Python for which I am required to ...
8
votes
1answer
1k views

Loss jumps abruptly when I decay the learning rate with Adam optimizer in PyTorch

I'm training an auto-encoder network with Adam optimizer (with amsgrad=True) and ...
2
votes
0answers
185 views

Extend the loss function from the single action to the n-action case per time step

My question concerns a side question (which was not answered) asked here: Policy gradients for multiple continuous actions I am trying to implement a simple policy gradient algorithm for a discrete ...