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 __init__(
      self,
      net,
      imdb,
      im_detect,
      svmWeightsPath,
      svmBiasPath,
      svmFeatScalePath,
      svm_C,
      svm_B,
      svm_nrEpochs,
      svm_retrainLimit,
      svm_evictThreshold,
      svm_posWeight,
      svm_targetNorm,
      svm_penality,
      svm_loss,
      svm_rngSeed,
  ):
      self.net = net
      self.imdb = imdb
      self.im_detect = im_detect
      self.svm_nrEpochs = svm_nrEpochs
      self.svm_targetNorm = svm_targetNorm
      self.svmWeightsPath = svmWeightsPath
      self.svmBiasPath = svmBiasPath
      self.svmFeatScalePath = svmFeatScalePath
      self.layer = "fc7"
      self.hard_thresh = -1.0001
      self.neg_iou_thresh = 0.3
      dim = net.params["cls_score"][0].data.shape[1]
      self.feature_scale = self._get_feature_scale()
      print("Feature dim: {}".format(dim))
      print("Feature scale: {:.3f}".format(self.feature_scale))
      self.trainers = [
          SVMClassTrainer(
              cls,
              dim,
              self.feature_scale,
              svm_C,
              svm_B,
              svm_posWeight,
              svm_penality,
              svm_loss,
              svm_rngSeed,
              svm_retrainLimit,
              svm_evictThreshold,
          )
          for cls in imdb.classes
      ]
  
imports: from timer import Timer
  from sklearn import svm
  import numpy
label_desc: Use image node_id 1 to create a new SVMTrainer object from inherited base classes: object with example: obj = SVMTrainer(net, imdb, im_detect, svmWeightsPath, svmBiasPath, svmFeatScalePath, svm_C, svm_B, svm_nrEpochs, svm_retrainLimit, svm_evictThreshold, svm_posWeight, svm_targetNorm, svm_penality, svm_loss, svm_rngSeed)