class_docstr: Feature extractor with list return
  
  A specialization of FeatureDictNet that always returns features as a list (values() of dict).
class_docstr_tok: ["Feature","extractor","with","list","return","A","specialization","of","FeatureDictNet","that","always","returns","features","as","a","list","(","values","(",")","of","dict",")","."]
docstr: Args:
      model: Model from which to extract features.
      out_indices: Output indices of the model features to extract.
      feature_concat: Concatenate intermediate features that are lists or tuples instead of selecting
          first element e.g. `x[0]`
      flatten_sequential: Flatten first two-levels of sequential modules in model (re-writes model modules)
docstr_tok: ["Args",":","model",":","Model","from","which","to","extract","features",".","out_indices",":","Output","indices","of","the","model","features","to","extract",".","feature_concat",":","Concatenate","intermediate","features","that","are","lists","or","tuples","instead","of","selecting","first","element","e.g",".","`","x","[","0","]","`","flatten_sequential",":","Flatten","first","two-levels","of","sequential","modules","in","model","(","re-writes","model","modules",")"]
code: def __init__(
      self,
      model: nn.Module,
      out_indices: Tuple[int, ...] = (0, 1, 2, 3, 4),
      output_fmt: str = "NCHW",
      feature_concat: bool = False,
      flatten_sequential: bool = False,
  ):
      """
      Args:
          model: Model from which to extract features.
          out_indices: Output indices of the model features to extract.
          feature_concat: Concatenate intermediate features that are lists or tuples instead of selecting
              first element e.g. `x[0]`
          flatten_sequential: Flatten first two-levels of sequential modules in model (re-writes model modules)
      """
      super().__init__(
          model,
          out_indices=out_indices,
          output_fmt=output_fmt,
          feature_concat=feature_concat,
          flatten_sequential=flatten_sequential,
      )
  
imports: from collections import OrderedDict, defaultdict
  from copy import deepcopy
  from functools import partial
  from typing import Dict, List, Sequence, Tuple, Union
  import torch
  import torch.nn
  from torch.utils.checkpoint import checkpoint
  from timm.layers import Format
label_desc: Use image node_id 1 to create a new FeatureListNet object from inherited base classes: FeatureDictNet with example: obj = FeatureListNet(model, out_indices, output_fmt, feature_concat, flatten_sequential)