class_docstr: A `Sampler` which uses the Gumbel-Top-K trick to sample without replacement. See
  [*Stochastic Beams and Where to Find Them: The Gumbel-Top-k Trick for Sampling
  Sequences Without Replacement*, W Kool, H Van Hoof and M Welling, 2010]
  (https://api.semanticscholar.org/CorpusID:76662039).
  
  # Parameters
  
  temperature : `float`, optional (default = `1.0`)
      A `temperature` below 1.0 produces a sharper probability distribution and a `temperature`
      above 1.0 produces a flatter probability distribution.
class_docstr_tok: ["A","`","Sampler","`","which","uses","the","Gumbel-Top-K","trick","to","sample","without","replacement",".","See","[","*","Stochastic","Beams","and","Where","to","Find","Them",":","The","Gumbel-Top-k","Trick","for","Sampling","Sequences","Without","Replacement","*",",","W","Kool",",","H","Van","Hoof","and","M","Welling",",","2010","]","(","https",":","\/\/api.semanticscholar.org\/CorpusID:76662039",")",".","#","Parameters","temperature",":","`","float","`",",","optional","(","default","=","`","1.0","`",")","A","`","temperature","`","below","1.0","produces","a","sharper","probability","distribution","and","a","`","temperature","`","above","1.0","produces","a","flatter","probability","distribution","."]
code: def __init__(self, temperature: float = 1.0):
      self.temperature = temperature
  
imports: from inspect import signature
  from typing import Any, List, Callable, Tuple, Dict, cast, TypeVar, Optional
  import copy
  import warnings
  import torch
  from allennlp.common import Lazy, Registrable
  from allennlp.common.checks import ConfigurationError
  from allennlp.data import Vocabulary
  from allennlp.nn.util import min_value_of_dtype
label_desc: Use image node_id 1 to create a new GumbelSampler object from inherited base classes: Sampler with example: obj = GumbelSampler(temperature)