tree: 2ac59e1ad88a96e555daefbaad21d1cde1c2d0e6 [path history] [tgz]
  1. data.py
  2. linear_model.py
  3. README.md
  4. train.py
  5. weighted_softmax_ce.py
example/sparse/linear_classification/README.md

Linear Classification Using Sparse Matrix Multiplication

This examples trains a linear model using the sparse feature in MXNet. This is for demonstration purpose only.

The example utilizes the sparse data loader (mx.io.LibSVMIter), the sparse dot operator and sparse gradient updaters to train a linear model on the Avazu click-through-prediction dataset.

The example also shows how to perform distributed training with the sparse feature.

  • python train.py

Notes on Distributed Training:

  • For distributed training, please use the ../../tools/launch.py script to launch a cluster.
  • For example, to run two workers and two servers with one machine, run ../../../tools/launch.py -n 2 --launcher=local python train.py --kvstore=dist_async