Questions tagged [hinge-loss]

11 questions
4
votes
0 answers

CUDA error 59: Device-side assert triggered

I get the above error with Pytorch, with the following assertion: /opt/conda/conda-bld/pytorch_1565272269120/work/aten/src/ATen/native/cuda/IndexKernel.cu:60: lambda [](int)->auto::operator()(int)->auto: block: [1,0,0], thread: [127,0,0] assertion…
Divyat
  • 151
  • 14
2
votes
1 answer

Understanding hinge loss in scikit learn

I have seen this hinge loss chart: https://math.stackexchange.com/questions/782586/how-do-you-minimize-hinge-loss And also here: https://programmathically.com/understanding-hinge-loss-and-the-svm-cost-function/ However, creating the "same" graph…
Alberto
  • 23
  • 4
2
votes
0 answers

Query about Loss Functions for LSTM models (Binary Classification)

I'm working on building an LSTM model to binary classify price movements. My training data is data I simulated, it's a 2,000 rows * 3,780 columns dataframe of price movements. I have a separate labels file that classifies price movements as either 1…
Ian Murray
  • 87
  • 8
2
votes
1 answer

Last layer of CNN with SVM in the loss function

How are you? I am trying to implement an SVM within of the keras cost function using sklearn.svm. However, I always get errors. I believe the problem is to convert the y_true and y_pred tensor into a numpy array to be used in sklearn.svm. Then I…
Gledson
  • 61
  • 4
2
votes
0 answers

Densenet with Hinge loss on CIFAR dataset

I am trying to use Hinge loss with densenet on the CIFAR 100 dataset. The learning converges to some point and after that there is no learning. The accuracy is much less than Densenet with CrossEntropy loss function. I tried with different learning…
user570593
  • 3,420
  • 12
  • 56
  • 91
0
votes
0 answers

SVM using hinge loss function to maximize margin with gradient descent wont converge

I am implementing an SVM and to find the largest margin, I am using a hinge loss cost function like this from this article, but I am implementing it myself. So far I have come up with this, which produces odd values when predicting from my data set,…
eisa.exe
  • 78
  • 9
0
votes
1 answer

custom hinge loss vs sklearn hinge loss

I've written a custom hinge loss function based on the hinge loss formula and tested it on a dataset as well as the sklearn.metrics hinge_loss. But the outcomes are soo different. Could someone please take a look and let me know what I am getting…
tensai
  • 51
  • 7
0
votes
0 answers

Soft svm problem, what will be the w and bias for this data set?

I am having hard time to calculate the soft SVM solution. I can't understand how to penalty mistakes ,for example- will be 0 therefore I will need to give 1 penalty(hinge loss). Each line that will separate the data will do really bad…
0
votes
1 answer

Using hinge loss for binary semantic segmentation

I am exploring the idea of the ensemble technique for the semantic segmentation model. I initially wanted to use a support vector machine combined with UNet/ResNet/DeepLabV3 for the last layer. I found that I could use 'hinge loss' as a loss…
0
votes
0 answers

Robust Machine learning of Mnist data set using Hinge loss

Am training Mnist.csv for robustness adding Gaussian noise using python random library,but how will I decide on the mean and std of noise to be added to the dataset.Am using a standardized data with 785 (28281) column and training for fog,brightness…
0
votes
1 answer

Convert this loss function equation into python code

Please check this equation of this link and convert it into a python loss function for a simple keras model. EQUATION PICTURE OR IMAGE LINK FOR CONVERTING IT TO PYTHON'S KERAS REQUIRED LOSS EQUATION where the max part or the curve selected part of…