class_docstr: Mixed module, in which fprop is decided by exactly one or multiple (sampled) module.
  If multiple module is selected, the result will be sumed and returned.
  
  Attributes
  ----------
  sampled : int or list of int
      Sampled module indices.
  mask : tensor
      A multi-hot bool 1D-tensor representing the sampled mask.
class_docstr_tok: ["Mixed","module",",","in","which","fprop","is","decided","by","exactly","one","or","multiple","(","sampled",")","module",".","If","multiple","module","is","selected",",","the","result","will","be","sumed","and","returned",".","Attributes","--","--","--","--","--","sampled",":","int","or","list","of","int","Sampled","module","indices",".","mask",":","tensor","A","multi-hot","bool","1D-tensor","representing","the","sampled","mask","."]
code: def __init__(self, layer_choice):
      super(PathSamplingLayerChoice, self).__init__()
      self.op_names = []
      for name, module in layer_choice.named_children():
          self.add_module(name, module)
          self.op_names.append(name)
      assert (
          self.op_names
      ), "There has to be at least one op to choose from."
      self.sampled = None
  
imports: import logging
  from collections import OrderedDict
  import time
  import numpy
  import torch
  import nni.retiarii.nn.pytorch
  from nni.nas.pytorch.mutables import Mutable, InputChoice, LayerChoice
label_desc: Use image node_id 1 to create a new PathSamplingLayerChoice object from inherited base classes: nn with example: obj = PathSamplingLayerChoice(layer_choice)