Svm_train is a function to trains a batch of samples using support vector machine model and output a weight vecotor for classification. This function used SGD(Stochastic Gradient Descent) method to get convergence.