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","."]
docstr: Sample one path based on alpha if label is not found in memo.
code: def resample(self, memo):
      """Sample one path based on alpha if label is not found in memo."""
      if self.label in memo:
          self._sampled = memo[self.label]
      else:
          probs = self._softmax(self._arch_alpha)
          # TODO: support real n_chosen is None
          n_chosen = self.n_chosen or 1
          sample = (
              torch.multinomial(probs, n_chosen).cpu().numpy().tolist()
          )
          self._sampled = sample
  
      return {self.label: self._sampled}
  
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 4 for calling the ProxylessMixedInput obj's underlying member method code with example usage: obj.resample(memo) and returns: dict