class_docstr: A module that chooses from a tensor list and outputs a reduced tensor.
  The already-chosen version of InputChoice.
  
  When forward, ``chosen`` will be used to select inputs from ``candidate_inputs``,
  and ``reduction`` will be used to choose from those inputs to form a tensor.
  
  Attributes
  ----------
  chosen : list of int
      Indices of chosen inputs.
  reduction : ``mean`` | ``concat`` | ``sum`` | ``none``
      How to reduce the inputs when multiple are selected.
class_docstr_tok: ["A","module","that","chooses","from","a","tensor","list","and","outputs","a","reduced","tensor",".","The","already-chosen","version","of","InputChoice",".","When","forward",",","``","chosen","``","will","be","used","to","select","inputs","from","``","candidate_inputs","``",",","and","``","reduction","``","will","be","used","to","choose","from","those","inputs","to","form","a","tensor",".","Attributes","--","--","--","--","--","chosen",":","list","of","int","Indices","of","chosen","inputs",".","reduction",":","``","mean","``","|","``","concat","``","|","``","sum","``","|","``","none","``","How","to","reduce","the","inputs","when","multiple","are","selected","."]
code: def __init__(
      self, chosen: Union[List[int], int], reduction: ReductionType
  ):
      super().__init__()
      self.chosen = chosen if isinstance(chosen, list) else [chosen]
      self.reduction = reduction
  
imports: import functools
  import warnings
  from typing import Any, Iterator, List, Optional, Dict, Union, Tuple, cast
  from typing_extensions import Literal
  import torch
  import torch.nn
  from nni.mutable import Categorical, CategoricalMultiple, Sample, SampleValidationError, ensure_frozen
  from .base import MutableModule, recursive_freeze
label_desc: Use image node_id 1 to create a new ChosenInputs object from inherited base classes: nn with example: obj = ChosenInputs(chosen, reduction)