def METHOD_NAME(self, cuda=False):
    device = torch.device("cuda") if cuda else torch.device("cpu")
    a, b = torch.zeros(2, device=device), torch.ones(2, device=device)
    sigma = 0.1
    prior = SmoothedBoxPrior(a, b, sigma, transform=torch.exp)
    t = torch.tensor([0.5, 1.1], device=device).log()
    self.assertAlmostEqual(prior.log_prob(t).item(), -0.9473, places=4)
    t = torch.tensor([[0.5, 1.1], [0.1, 0.25]], device=device).log()
    log_prob_expected = torch.tensor([-0.947347, -0.447347], device=t.device)
    self.assertTrue(torch.all(approx_equal(prior.log_prob(t), log_prob_expected)))
    with self.assertRaises(RuntimeError):
        prior.log_prob(torch.ones(3, device=device))