docstr: Get normalized probabilities (or log probs) from a net's output.
docstr_tok: ["Get","normalized","probabilities","(","or","log","probs",")","from","a","net","'s","output","."]
code: def get_normalized_probs(
      self,
      net_output,
      log_probs,
      sample=None,
  ):
      """Get normalized probabilities (or log probs) from a net's output."""
      if isinstance(net_output, dict):
          return self.speech_decoder.get_normalized_probs(
              net_output, log_probs, sample
          )
      return self.text_decoder.get_normalized_probs(
          net_output, log_probs, sample
      )
  
imports: import logging
  from collections import OrderedDict, namedtuple
  from typing import Dict, Optional
  import torch
  import torch.nn
  import torch.nn.functional
  from torch import Tensor
  from fairseq import checkpoint_utils, utils
  from fairseq.file_io import PathManager
  from fairseq.models import FairseqDecoder, FairseqEncoderDecoderModel, register_model, register_model_architecture
  from fairseq.models.speech_to_text import MultiInputDecoder, MultiModalityEncoder, SpeechWavTransformerEncoder, StackedSpeechWavTransformerEncoder
  from fairseq.models.transformer import TransformerDecoder, TransformerEncoder, TransformerModel
label_desc: Use image node_id 3 for calling the SpeechTextPreTrainDecoder obj's underlying member method code with example usage: obj.get_normalized_probs(net_output, log_probs, sample) and returns: self, self