Is it possible to implement One Class SVM as a part of a Neural Network in PyTorch?
I am doing an experiment for my research on outlier detection and I need to implement One Class SVM as a layer and its objective function as apart of the main objective / loss function. I know I could use ScikitLearn and LibSVM for the same. But my experiment needs it to be a part of a neural network ensemble I am building. So the weights should be iteratively learnable with the other parameters of the NN.
Any help or pointers would be appreciated.