class_docstr: Convolutional Neural Network used for image classification, whose
  architecture can be any of the `VALID_ARCHITECTURES`.
  
  This class wraps the `tf.slim` implementations of these models, with some
  helpful additions.
class_docstr_tok: ["Convolutional","Neural","Network","used","for","image","classification",",","whose","architecture","can","be","any","of","the","`","VALID_ARCHITECTURES","`",".","This","class","wraps","the","`","tf.slim","`","implementations","of","these","models",",","with","some","helpful","additions","."]
code: def network(self, is_training=False):
      if self.vgg_type:
          return functools.partial(
              getattr(vgg, self._architecture),
              is_training=is_training,
              spatial_squeeze=self._config.get(
                  "spatial_squeeze", False
              ),
          )
      elif self.truncated_vgg_type:
          return functools.partial(
              getattr(truncated_vgg, self._architecture),
              is_training=is_training,
          )
  
      elif self.resnet_v1_type:
          output_stride = self._config.get("output_stride")
          train_batch_norm = is_training and self._config.get(
              "train_batch_norm"
          )
          return functools.partial(
              getattr(resnet_v1, self._architecture),
              is_training=train_batch_norm,
              num_classes=None,
              global_pool=False,
              output_stride=output_stride,
          )
      elif self.resnet_v2_type:
          output_stride = self._config.get("output_stride")
          return functools.partial(
              getattr(resnet_v2, self._architecture),
              is_training=is_training,
              num_classes=self._config.get("num_classes"),
              output_stride=output_stride,
          )
  
imports: import functools
  import sonnet
  import tensorflow
  import tensorflow.contrib.slim
  from tensorflow.contrib.slim.nets import resnet_v2, resnet_v1, vgg
  from luminoth.models.base import truncated_vgg
  from luminoth.utils.checkpoint_downloader import get_checkpoint_file
label_desc: Use image node_id 3 for calling the BaseNetwork obj's underlying member method code with example usage: obj.network(is_training) and returns: functools, functools, functools, functools