diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 3827e33..f695415 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -3,10 +3,10 @@ name: CI on: push: branches: - - master + - test pull_request: branches: - - master + - test permissions: contents: write diff --git a/MCintegration/maps.py b/MCintegration/maps.py index 8cf3499..f91d555 100644 --- a/MCintegration/maps.py +++ b/MCintegration/maps.py @@ -17,11 +17,11 @@ def __init__(self, batch_size, dim, f_dim, device=None, dtype=torch.float32): self.dim = dim self.f_dim = f_dim self.batch_size = batch_size - self.u = torch.empty((batch_size, dim), dtype=dtype, device=self.device) - self.x = torch.empty((batch_size, dim), dtype=dtype, device=self.device) - self.fx = torch.empty((batch_size, f_dim), dtype=dtype, device=self.device) - self.weight = torch.empty((batch_size,), dtype=dtype, device=self.device) - self.detJ = torch.empty((batch_size,), dtype=dtype, device=self.device) + self.u = torch.rand((batch_size, dim), dtype=dtype, device=self.device) + self.x = torch.rand((batch_size, dim), dtype=dtype, device=self.device) + self.fx = torch.zeros((batch_size, f_dim), dtype=dtype, device=self.device) + self.weight = torch.ones((batch_size,), dtype=dtype, device=self.device) + self.detJ = torch.ones((batch_size,), dtype=dtype, device=self.device) class Map(nn.Module):