code: def batch_log_maxvecmul(A, b):
      """Similar to batch_log_matvecmul, but takes a maximum instead of
      logsumexp. Returns both the max and the argmax.
  
      Arguments
      ---------
      A : torch.Tensor (batch, dim1, dim2)
          Tensor.
      b : torch.Tensor (batch, dim1)
          Tensor
  
      Outputs
      -------
      x : torch.Tensor (batch, dim1)
          Tensor.
      argmax : torch.Tensor (batch, dim1)
          Tensor.
  
      Example
      -------
      >>> A = torch.tensor([[[   0., -1.],
      ...                    [ -1e5,  0.]]])
      >>> b = torch.tensor([[0., 0.,]])
      >>> x, argmax = batch_log_maxvecmul(A, b)
      >>> x
      tensor([[0., 0.]])
      >>> argmax
      tensor([[0, 1]])
      """
      b = b.unsqueeze(1)
      x, argmax = torch.max(A + b, dim=2)
  
      return x, argmax
  
imports: import torch
  import random
  from speechbrain.utils.checkpoints import register_checkpoint_hooks
  from speechbrain.utils.checkpoints import mark_as_saver
  from speechbrain.utils.checkpoints import mark_as_loader
  from speechbrain.utils.data_utils import undo_padding
label_desc: Use image node_id 3 for calling a global function with example usage: batch_log_maxvecmul(A, b) and returns: x,  argmax