Questions tagged [loss]

599 questions
80
votes
9 answers

Lost code lines when Notepad++ crashed

I was working on a .js file this morning on Notepad++, as usual, when the program just crashed. So I ended it, and re-opened it to see that all my code lines in my .js file, had disappeared, and now all I have left is the file with a size of 0kb…
Netero_sama
  • 823
  • 1
  • 6
  • 7
64
votes
4 answers

Cross Entropy in PyTorch

Cross entropy formula: But why does the following give loss = 0.7437 instead of loss = 0 (since 1*log(1) = 0)? import torch import torch.nn as nn from torch.autograd import Variable output = Variable(torch.FloatTensor([0,0,0,1])).view(1,…
MBT
  • 21,733
  • 19
  • 84
  • 102
41
votes
5 answers

How to interpret increase in both loss and accuracy

I have run deep learning models(CNN's) using tensorflow. Many times during the epoch, i have observed that both loss and accuracy have increased, or both have decreased. My understanding was that both are always inversely related. What could be…
Nitin
  • 2,572
  • 5
  • 21
  • 28
29
votes
3 answers

How to train the network only on one output when there are multiple outputs?

I am using a multiple output model in Keras model1 = Model(input=x, output=[y2, y3]) model1.compile((optimizer='sgd', loss=cutom_loss_function) my custom_loss function is def custom_loss(y_true, y_pred): y2_pred = y_pred[0] y2_true =…
shaaa
  • 503
  • 1
  • 4
  • 16
25
votes
5 answers

ffmpeg convert without loss quality

I need convert all videos to my video player (in website) when file type is other than flv/mp4/webm. When I use: ffmpeg -i filename.mkv -sameq -ar 22050 filename.mp4 : [h264 @ 0x645ee0] error while decoding MB 22 1, bytestream (8786) My point is,…
Jensej
  • 1,255
  • 6
  • 21
  • 33
24
votes
1 answer

log loss output is greater than 1

I prepared several models for binary classification of documents in the fraud field. I calculated the log loss for all models. I thought it was essentially measuring the confidence of the predictions and that log loss should be in the range of…
OAK
  • 2,994
  • 9
  • 36
  • 49
20
votes
1 answer

Change loss function dynamically during training in Keras, without recompiling other model properties like optimizer

Is it possible to set model.loss in a callback without re-compiling model.compile(...) after (since then the optimizer states are reset), and just recompiling model.loss, like for example: class NewCallback(Callback): def __init__(self): …
Horse
  • 361
  • 2
  • 6
20
votes
1 answer

Loss & accuracy - Are these reasonable learning curves?

I am learning neural networks and I built a simple one in Keras for the iris dataset classification from the UCI machine learning repository. I used a one hidden layer network with a 8 hidden nodes. Adam optimizer is used with a learning rate of…
Ananda
  • 2,925
  • 5
  • 22
  • 45
20
votes
3 answers

What is a loss function in simple words?

Can anyone please explain in simple words and possibly with some examples what is a loss function in the field of machine learning/neural networks? This came out while I was following a Tensorflow…
Federico
  • 333
  • 1
  • 4
  • 19
14
votes
1 answer

What exactly are the losses in Matterport Mask-R-CNN?

I use Mask-R-CNN to train my data with it. When i use TensorBoard to see the result, i have the loss, mrcnn_bbox_loss, mrcnn_class_loss, mrcnn_mask_loss, rpn_bbox_loss, rpn_class_loss and all the same 6 loss for the validation: val_loss,…
Mob
  • 409
  • 1
  • 5
  • 14
13
votes
3 answers

Noisy training loss

I am training encoder-decoder attention-based model, with batch size 8. I don't suspect too much noise in the dataset, however the examples come from a few different distributions. I can see a lot of noise in the train loss curve. After averaging…
12
votes
2 answers

How to use the BCELoss in PyTorch?

I want to write a simple autoencoder in PyTorch and use BCELoss, however, I get NaN out, since it expects the targets to be between 0 and 1. Could someone post a simple use case of BCELoss?
Qubix
  • 4,161
  • 7
  • 36
  • 73
12
votes
3 answers

Why is the logloss negative?

I just applied the log loss in sklearn for logistic regression: http://scikit-learn.org/stable/modules/generated/sklearn.metrics.log_loss.html My code looks something like this: def perform_cv(clf, X, Y, scoring): kf = KFold(X.shape[0],…
toom
  • 12,864
  • 27
  • 89
  • 128
11
votes
3 answers

Average UDP packet loss and packet re-ordering

I'd like to garner fellow SO'ers experience with regards to the issue of UDP packet loss (or drop-out). Initially my understanding is that given direct point to point connections where the NICs are connected via a crossover cable and ample buffer on…
Sami Kenjat
  • 185
  • 2
  • 12
10
votes
1 answer

Comparing AUC, log loss and accuracy scores between models

I have the following evaluation metrics on the test set, after running 6 models for a binary classification problem: accuracy logloss AUC 1 19% 0.45 0.54 2 67% 0.62 0.67 3 66% 0.63 0.68 4 67% 0.62 0.66 5 63%…
quant
  • 4,062
  • 5
  • 29
  • 70
1
2 3
39 40