• Stars
    star
    157
  • Rank 238,399 (Top 5 %)
  • Language
    Python
  • License
    MIT License
  • Created over 7 years ago
  • Updated over 1 year ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Linear SVM with PyTorch

Support Vector Machines

  • Support Vector Machines (SVMs) with Linear Kernel
  • Stochastic Gradient Descent (SGD)

Requirements

$ pip install matplotlib numpy scikit-learn
$ pip install "torch>=0.4.0"

Example

python main.py --c 0.01 --batchsize 1
Hard margin
c = 0, batchsize = 1
Soft margin
c = 0.01, batchsize = 1