class_docstr: Proxyless version of differentiable input choice.
  See :class:`ProxylessMixedLayer` for implementation details.
class_docstr_tok: ["Proxyless","version","of","differentiable","input","choice",".","See",":","class",":","`","ProxylessMixedLayer","`","for","implementation","details","."]
code: def __init__(
      self,
      n_candidates: int,
      n_chosen: int | None,
      alpha: torch.Tensor,
      softmax: nn.Module,
      label: str,
  ):
      super().__init__(n_candidates, n_chosen, alpha, softmax, label)
  
      # We only support choosing a particular one in forward.
      # Nevertheless, we rank the score and export the tops in export.
      self._sampled: list[int] | None = None
  
imports: from __future__ import annotations
  from typing import Any, cast
  import torch
  import torch.nn
  from nni.mutable import Categorical, Mutable, Sample, SampleValidationError, MutableExpression, label_scope, auto_label
  from nni.nas.nn.pytorch import Repeat, recursive_freeze
  from .base import BaseSuperNetModule
  from .differentiable import DifferentiableMixedLayer, DifferentiableMixedInput
  from ._expression_utils import traverse_all_options
label_desc: Use image node_id 1 to create a new ProxylessMixedInput object from inherited base classes: DifferentiableMixedInput with example: obj = ProxylessMixedInput(n_candidates, n_chosen, alpha, softmax, label)