class_docstr: Single Shot Multibox Detector with 300x300 inputs.
  
  This is a model of Single Shot Multibox Detector [#]_.
  This model uses :class:`~chainercv.links.model.ssd.VGG16Extractor300` as
  its feature extractor.
  
  .. [#] Wei Liu, Dragomir Anguelov, Dumitru Erhan, Christian Szegedy,
     Scott Reed, Cheng-Yang Fu, Alexander C. Berg.
     SSD: Single Shot MultiBox Detector. ECCV 2016.
  
  Args:
     n_fg_class (int): The number of classes excluding the background.
     pretrained_model (string): The weight file to be loaded.
         This can take :obj:`'voc0712'`, `filepath` or :obj:`None`.
         The default value is :obj:`None`.
  
          * :obj:`'voc0712'`: Load weights trained on trainval split of                 PASCAL VOC 2007 and 2012.                 The weight file is downloaded and cached automatically.                 :obj:`n_fg_class` must be :obj:`20` or :obj:`None`.                 These weights were converted from the Caffe model provided by                 `the original implementation                 <https://github.com/weiliu89/caffe/tree/ssd>`_.                 The conversion code is `chainercv/examples/ssd/caffe2npz.py`.
          * :obj:`'imagenet'`: Load weights of VGG-16 trained on ImageNet.                 The weight file is downloaded and cached automatically.                 This option initializes weights partially and the rests are                 initialized randomly. In this case, :obj:`n_fg_class`                 can be set to any number.
          * `filepath`: A path of npz file. In this case, :obj:`n_fg_class`                 must be specified properly.
          * :obj:`None`: Do not load weights.
class_docstr_tok: ["Single","Shot","Multibox","Detector","with","300x300","inputs",".","This","is","a","model","of","Single","Shot","Multibox","Detector","[","#","]","_",".","This","model","uses",":","class",":","`","~chainercv.links.model.ssd.VGG16Extractor300","`","as","its","feature","extractor",".","..","[","#","]","Wei","Liu",",","Dragomir","Anguelov",",","Dumitru","Erhan",",","Christian","Szegedy",",","Scott","Reed",",","Cheng-Yang","Fu",",","Alexander","C.","Berg",".","SSD",":","Single","Shot","MultiBox","Detector",".","ECCV","2016",".","Args",":","n_fg_class","(","int",")",":","The","number","of","classes","excluding","the","background",".","pretrained_model","(","string",")",":","The","weight","file","to","be","loaded",".","This","can","take",":","obj",":","`","'voc0712","'","`",",","`","filepath","`","or",":","obj",":","`","None","`",".","The","default","value","is",":","obj",":","`","None","`",".","*",":","obj",":","`","'voc0712","'","`",":","Load","weights","trained","on","trainval","split","of","PASCAL","VOC","2007","and","2012",".","The","weight","file","is","downloaded","and","cached","automatically",".",":","obj",":","`","n_fg_class","`","must","be",":","obj",":","`","20","`","or",":","obj",":","`","None","`",".","These","weights","were","converted","from","the","Caffe","model","provided","by","`","the","original","implementation","<","https",":","\/\/github.com\/weiliu89\/caffe\/tree\/ssd",">","`","_",".","The","conversion","code","is","`","chainercv\/examples\/ssd\/caffe2npz.py","`",".","*",":","obj",":","`","'imagenet","'","`",":","Load","weights","of","VGG-16","trained","on","ImageNet",".","The","weight","file","is","downloaded","and","cached","automatically",".","This","option","initializes","weights","partially","and","the","rests","are","initialized","randomly",".","In","this","case",",",":","obj",":","`","n_fg_class","`","can","be","set","to","any","number",".","*","`","filepath","`",":","A","path","of","npz","file",".","In","this","case",",",":","obj",":","`","n_fg_class","`","must","be","specified","properly",".","*",":","obj",":","`","None","`",":","Do","not","load","weights","."]
code: def __init__(self, n_fg_class=None, pretrained_model=None):
      param, path = utils.prepare_pretrained_model(
          {"n_fg_class": n_fg_class}, pretrained_model, self._models
      )
  
      super(SSD300, self).__init__(
          extractor=VGG16Extractor300(),
          multibox=Multibox(
              n_class=param["n_fg_class"] + 1,
              aspect_ratios=((2,), (2, 3), (2, 3), (2, 3), (2,), (2,)),
          ),
          steps=(8, 16, 32, 64, 100, 300),
          sizes=(30, 60, 111, 162, 213, 264, 315),
          mean=_imagenet_mean,
      )
  
      if path:
          chainer.serializers.load_npz(path, self, strict=False)
  
imports: from __future__ import division
  import numpy
  import chainer
  import chainer.functions
  from chainer import initializers
  import chainer.links
  from chainercv.links.model.ssd import Multibox
  from chainercv.links.model.ssd import Normalize
  from chainercv.links.model.ssd import SSD
  from chainercv import utils
label_desc: Use image node_id 1 to create a new SSD300 object from inherited base classes: SSD with example: obj = SSD300(n_fg_class, pretrained_model)