docstr: Log interpretation of network predictions in tensorboard.
docstr_tok: ["Log","interpretation","of","network","predictions","in","tensorboard","."]
code: def log_interpretation(self, x, out, batch_idx):
      """
      Log interpretation of network predictions in tensorboard.
      """
      label = ["val", "train"][self.training]
      if self.log_interval > 0 and batch_idx % self.log_interval == 0:
          fig = self.plot_interpretation(x, out, idx=0)
          name = f"{label.capitalize()} interpretation of item 0 in "
          if self.training:
              name += f"step {self.global_step}"
          else:
              name += f"batch {batch_idx}"
          self.logger.experiment.add_figure(
              name, fig, global_step=self.global_step
          )
  
file_path: pytorch-forecasting/pytorch_forecasting/models/nbeats/__init__.py
imports: from typing import Dict, List
  import matplotlib.pyplot
  import torch
  from torch import nn
  from pytorch_forecasting.data import TimeSeriesDataSet
  from pytorch_forecasting.data.encoders import NaNLabelEncoder
  from pytorch_forecasting.metrics import MAE, MAPE, MASE, RMSE, SMAPE, MultiHorizonMetric
  from pytorch_forecasting.models.base_model import BaseModel
  from pytorch_forecasting.models.nbeats.sub_modules import NBEATSGenericBlock, NBEATSSeasonalBlock, NBEATSTrendBlock
label_desc: Use image node_id 5 for calling the NBeats obj's underlying member method code with example usage: obj.log_interpretation(x, out, batch_idx) without return types