class_docstr: Trains post-hoc detection SVMs for all classes using the algorithm
  and hyper-parameters of traditional R-CNN.
class_docstr_tok: ["Trains","post-hoc","detection","SVMs","for","all","classes","using","the","algorithm","and","hyper-parameters","of","traditional","R-CNN","."]
code: def train(self):
      # Initialize SVMs using
      #   a. w_i = fc8_w_i - fc8_w_0
      #   b. b_i = fc8_b_i - fc8_b_0
      #   c. Install SVMs into net
      self.initialize_net()
  
      # Pass over roidb to count num positives for each class
      #   a. Pre-allocate arrays for positive feature vectors
      # Pass over roidb, computing features for positives only
      self.get_pos_examples()
  
      # Pass over roidb
      #   a. Compute cls_score with forward pass
      #   b. For each class
      #       i. Select hard negatives
      #       ii. Add them to cache
      #   c. For each class
      #       i. If SVM retrain criteria met, update SVM
      #       ii. Install new SVM into net
      self.train_with_hard_negatives()
  
      # One final SVM retraining for each class
      # Install SVMs into net
      for j in range(1, self.imdb.num_classes):
          new_w_b = self.trainers[j].append_neg_and_retrain(force=True)
          self.update_net(j, new_w_b[0], new_w_b[1])
  
      # save svm
      np.savetxt(
          self.svmWeightsPath, self.net.params["cls_score"][0].data
      )
      np.savetxt(self.svmBiasPath, self.net.params["cls_score"][1].data)
      np.savetxt(self.svmFeatScalePath, [self.feature_scale])
  
imports: from timer import Timer
  from sklearn import svm
  import numpy
label_desc: Use image node_id 8 for calling the SVMTrainer obj's underlying member method code with example usage: obj.train() without return types