IBM/pytorchpipe

View on GitHub
configs/default/components/models/vision/generic_image_encoder.yml

Summary

Maintainability
Test Coverage
# This file defines the default values for the component wrapping (pretrained) Torch Vision models.

####################################################################
# 1. CONFIGURATION PARAMETERS that will be LOADED by the component.
####################################################################

# Model type (LOADED)
# Options: vgg16 | densenet121 | resnet152 | resnet50
model_type: vgg16

# Parameter denoting whether the component will return (flat) prediction
# or output of last feature layer (LOADED)
return_feature_maps: False

# Load weights of a model pretrained on ImageNet (LOADED)
pretrained: True

streams:
  ####################################################################
  # 2. Keymappings associated with INPUT and OUTPUT streams.
  ####################################################################

  # Stream containing batch of images (INPUT)
  inputs: inputs

  # Stream containing outputs (features or "predictions") (OUTPUT)
  outputs: outputs

globals:
  ####################################################################
  # 3. Keymappings of variables that will be RETRIEVED from GLOBALS.
  ####################################################################

  # Size of the output (RETRIEVED)
  # Used when return_features = False.
  output_size: output_size

  ####################################################################
  # 4. Keymappings associated with GLOBAL variables that will be SET.
  ####################################################################

  # Height of the returned features tensor (SET)
  # Used when return_features = True.
  feature_maps_height: feature_maps_height

  # Width of the returned features tensor (SET)
  # Used when return_features = True.
  feature_maps_width: feature_maps_width

  # Depth of the returned features tensor (SET)
  # Used when return_features = True.
  feature_maps_depth: feature_maps_depth

  ####################################################################
  # 5. Keymappings associated with statistics that will be ADDED.
  ####################################################################