SVM as an NNModuleSpec #
The SVM spec model includes a gradient-descent baseline and prediction helpers.
This file adds the NNModuleSpec wrapper so it can be composed/exported in the module system.
References:
- For the actual SVM objective/gradients and classic SVM citations (Cortes-Vapnik, Vapnik),
see
NN.Spec.Models.Svm:NN/Spec/Models/Svm.lean. - PyTorch analogy for the forward map: a linear score
X @ w + bis the same shape-level role astorch.nn.Linear(p, 1)(no activation).
Linear SVM wrapped as an NNModuleSpec (single-output linear layer).
Instances For
SpecChain wrapper for linear SVM.