Questions tagged [loss]

599 questions
0
votes
1 answer

Custom loss function with Keras to penalise more negative prediction

I understand that mse will treat both actual - predict, and predict - actual the same way. I want to write a custom loss function such that the penalty of predict > actual is more than actual > predict Say I will have 2x more penalty for being…
Hairy Ass
  • 190
  • 2
  • 10
0
votes
0 answers

Tool to measure packet loss for UDP protocol

I am trying to measure packet loss for a UDP video streaming. While streaming the video from source to destination, I run wireshark in the background to capture the traffic. But wireshark doesn't help me measure the packet loss. Is there any tool…
ST94
  • 35
  • 8
0
votes
1 answer

Plot MSE over epochs when the loss function is a customized function

I use a customzied loss function and would like to plot the MSE within epochs (I use Keras Library). This is the code I use to fit my neural network and save the history. model.compile(loss =new_loss2, metrics=['mse'], optimizer=opt) hist =…
Hajar Elhammouti
  • 103
  • 2
  • 10
0
votes
1 answer

Assign values to the tensors in keras while defining a new loss function

I am trying to define a loss function in Keras def rmseApprox(y_true, y_pred): dum = y_pred dum[y_pred>=0]=1.1 dum[y_pred<0]=1 return k.abs(K.mean(y_true - dum*y_pred), axis=-1) which increase the positive values by a factor of 1.1…
0
votes
1 answer

Autoencoder loss and accuracy on a simple binary data

I'm trying to understand and improve the loss and accuracy of the variational autoencoder. I filled the autoencoder with a simple binary data: data1 = np.array([0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0,…
MarioZ
  • 320
  • 4
  • 17
0
votes
0 answers

Adding a second loss mask in tensorflow

I'm using google's seq2seq library and based on some computations that I do between the predictions and the input I would like to zero out some of the losses for certain time steps (not for padding). What I do is basically to go through each batch…
lehar
  • 3
  • 4
0
votes
2 answers

cassandra cluster ping loss

We have 3 nodes Cassandra cluster. 2 nodes are in EU (seeds) and 1 node is in US. Sometimes we have network problems - ping loss between nodes in EU and US. Effect after network problems is that some data is missing on US node. We need to start…
0
votes
0 answers

Overfitting Deep Neural Network with Regression

I build a neural network with regression for predict a prime of insurance data. My Loss function take a very high value ( like 123000) and decrease unitl 30000; my accuracy remain constant at 1. I'm in a situation of overfitting? In Traing set I…
jjgasse
  • 319
  • 2
  • 5
  • 16
0
votes
0 answers

Keras custom loss function that computes the slope

How do I write a custom loss function of keras that computes the slope of y_pred and y_true and calculates the difference between the two slopes?
0
votes
1 answer

[MXNet]Periodic Loss Value when training with "step" learning rate policy

When training deep CNN, a common way is to use SGD with momentum with a "step" learning rate policy (e.g. learning rate set to be 0.1,0.01,0.001.. at different stages of training).But I encounter an unexpected phenomenon when training with this…
0
votes
1 answer

Custom external loss metric for Gradient Optimizer?

I have an external function which takes y and y_prediction (in matrix format), and computes a metric which depicts how good or bad the prediction actually is. Unfortunately the metric is no simple y - ypred or confusion matrix, but still very…
Rikku Porta
  • 307
  • 1
  • 4
  • 18
0
votes
2 answers

Custom weighted loss in cntk

I like to calculate weighted error below: def calc_err(pred, targets, weights) : nClass = np.size(pred, axis=0) Is = [1.0 for i in range(nClass)] nonTargets = C.minus(Is, targets) wrongPred = C.minus(Is, pred) wColumn =…
Jason Ruan
  • 55
  • 5
0
votes
1 answer

Very low Error but a low Accuracy in a keras RNN

More of a theoretical question than anything. If I have a near zero cross entropy loss in a binary classification where the last layer is a softmax and the input layer is an LSTM, does it make sense that the accuracy tops out at 54% on the train…
a1letterword
  • 307
  • 1
  • 4
  • 16
0
votes
1 answer

python svm function with huber loss

I need a svm classifier of python with huber loss function. But its default loss function is hinge loss. Do you know how can I assign loss function to python svm? svc = svm.SVC(kernel='linear', C=1, gamma=1).fit(data, label)
user3104352
  • 1,100
  • 1
  • 16
  • 34
0
votes
1 answer

Tensorflow Multiple Input Loss Function

I am trying to implement a CNN in Tensorflow (quite similar architecture to VGG), which then splits into two branches after the first fully connected layer. It follows this paper: https://arxiv.org/abs/1612.01697 Each of the two branches of the…