class_docstr: Autoregressive sequence model utilizing beam search.
  
  * batch_shape -> Given by initializer
  * event_shape -> N x T sequence of choices
  
  Parameters:
      model (AutoregressiveModel): A lazily computed autoregressive model.
      init (tuple of tensors, batch_shape x ...): initial state of autoregressive model.
      n_classes (int): number of classes in each time step
      n_length (int): max length of sequence
class_docstr_tok: ["Autoregressive","sequence","model","utilizing","beam","search",".","*","batch_shape","-",">","Given","by","initializer","*","event_shape","-",">","N","x","T","sequence","of","choices","Parameters",":","model","(","AutoregressiveModel",")",":","A","lazily","computed","autoregressive","model",".","init","(","tuple","of","tensors",",","batch_shape","x","...",")",":","initial","state","of","autoregressive","model",".","n_classes","(","int",")",":","number","of","classes","in","each","time","step","n_length","(","int",")",":","max","length","of","sequence"]
docstr: Compute "argmax" using greedy search.
  
  Returns:
      greedy_path (*batch x N x C*)
      greedy_max (*batch*)
      logits (*batch x N x C*)
docstr_tok: ["Compute","``","argmax","''","using","greedy","search",".","Returns",":","greedy_path","(","*","batch","x","N","x","C","*",")","greedy_max","(","*","batch","*",")","logits","(","*","batch","x","N","x","C","*",")"]
code: def greedy_max(self):
      """
      Compute "argmax" using greedy search.
  
      Returns:
          greedy_path (*batch x N x C*)
          greedy_max (*batch*)
          logits (*batch x N x C*)
      """
      a, b, c = self._beam_search(MaxSemiring)
      return a.squeeze(0), b.squeeze(0), c.squeeze(0)
  
file_path: pytorch-struct/torch_struct/autoregressive.py
imports: import torch
  from .semirings import MaxSemiring, KMaxSemiring, TempMax
  from torch.distributions.distribution import Distribution
label_desc: Use image node_id 4 for calling the Autoregressive obj's underlying member method code with example usage: obj.greedy_max() and returns: a,  b,  c