class_docstr: A transformer decoder block consists of an autoregressive attention block, encoder attention,
  and a feed-forward layer with pre/post process blocks in between.
docstr: Set inference_only.
docstr_tok: ["Set","inference_only","."]
code: def set_inference_only(self, inference_only: bool):
      """
      Set inference_only.
      """
      self.inference_only = inference_only
      if self.decoder_type == C.SSRU_TRANSFORMER:
          self.autoregr_layer.set_inference_only(inference_only)
  
imports: from dataclasses import dataclass
  from typing import Optional, Tuple
  import torch
  import sockeye.layers
  from sockeye import constants
  from .None import config
label_desc: Use image node_id 2 for calling the TransformerDecoderBlock obj's underlying member method code with example usage: obj.set_inference_only(inference_only) without return types