August 2018
Intermediate to advanced
272 pages
7h 2m
English
To train our model, we must define something called a loss function. The loss function will tell us how well or badly our model is currently doing its job.
Losses can be found in the tf.losses module. For this model, we will use the hinge loss. Hinge loss is the loss function used when creating a support vector machine (SVM). Hinge loss heavily punishes incorrect predictions. For one given example,
, where
is a feature vector of a datapoint and is its label, the hinge loss for it will be as follows:
To this, the following ...