docstr: Compute the number of true positives and the total number of elements
  of a given batch.
docstr_tok: ["Compute","the","number","of","true","positives","and","the","total","number","of","elements","of","a","given","batch","."]
code: def _compute_stats(self, y_pred, y_true):
      """
      Compute the number of true positives and the total number of elements
      of a given batch.
      """
      y_pred = y_pred.argmax(1)
      num_true_positives = (y_pred == y_true).long().sum().item()
      total_exemples = y_true.numel()
      return num_true_positives, total_exemples
  
file_path: poutyne/examples/medium_post/train_with_custom_metrics.py
imports: import torch
  import torch.nn
  from torch.utils.data import random_split
  from torchvision.datasets import MNIST
  from torchvision.transforms import ToTensor
  from poutyne import Model, Metric
label_desc: Use image node_id 2 for calling the MyAccuracyMetric obj's underlying member method code with example usage: obj._compute_stats(y_pred, y_true) and returns: num_true_positives,  total_exemples