import torch


def return_stats(first, second):
  """Get two boolean tensors, return number of TP, FN, and FP."""
  tp = torch.sum((first==second) * (first==1)).item()
  fn = torch.sum((first!=second) * (first==1)).item()
  fp = torch.sum((first!=second) * (first==0)).item()
  return tp, fn, fp