code: def p_losses(self, x_start, cond, t, noise=None):
      noise = default(noise, lambda: torch.randn_like(x_start))
  
      x_noisy = self.q_sample(x_start=x_start, t=t, noise=noise)
      x_recon = self.denoise_fn(x_noisy, t, cond=cond)
  
      if self.loss_type == "l1":
          loss = F.l1_loss(x_recon, noise)
      elif self.loss_type == "l2":
          loss = F.mse_loss(x_recon, noise)
      elif self.loss_type == "huber":
          loss = F.smooth_l1_loss(x_recon, noise)
      else:
          raise NotImplementedError()
  
      return loss
  
imports: from functools import partial
  from inspect import isfunction
  import numpy
  import torch
  from torch import nn, einsum
  import torch.nn.functional
label_desc: Use image node_id 13 for calling the GaussianDiffusion obj's underlying member method code with example usage: obj.p_losses(x_start, cond, t, noise) and returns: loss