class_docstr: Cross entropy loss for classification.
class_docstr_tok: ["Cross","entropy","loss","for","classification","."]
docstr: Convert network prediction into a point prediction.
  
  Returns best label
  
  Args:
      y_pred: prediction output of network
  
  Returns:
      torch.Tensor: point prediction
docstr_tok: ["Convert","network","prediction","into","a","point","prediction",".","Returns","best","label","Args",":","y_pred",":","prediction","output","of","network","Returns",":","torch.Tensor",":","point","prediction"]
code: def to_prediction(self, y_pred: torch.Tensor) -> torch.Tensor:
      """
      Convert network prediction into a point prediction.
  
      Returns best label
  
      Args:
          y_pred: prediction output of network
  
      Returns:
          torch.Tensor: point prediction
      """
      return y_pred.argmax(dim=-1)
  
imports: from typing import Any, Callable, Dict, List, Optional, Tuple, Union
  import scipy.stats
  import torch
  import torch.nn.functional
  from torch.nn.utils import rnn
  from pytorch_forecasting.metrics.base_metrics import MultiHorizonMetric
  from pytorch_forecasting.utils import create_mask, unpack_sequence, unsqueeze_like
label_desc: Use image node_id 2 for calling the CrossEntropy obj's underlying member method code with example usage: obj.to_prediction(y_pred) and returns: y_pred