Skip to content

Commit

Permalink
Update tensor type in target of calculate_start_values function
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexander März committed Jul 20, 2023
1 parent 446ec01 commit 01bb9c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lightgbmlss/distributions/distribution_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ def calculate_start_values(self,
Starting values for each distributional parameter.
"""
# Convert target to torch.tensor
target = torch.tensor(target, dtype=torch.float32)
target = torch.tensor(target).reshape(-1, 1)

# Initialize parameters
params = [torch.tensor(0.5, requires_grad=True) for _ in range(self.n_dist_param)]
Expand Down

0 comments on commit 01bb9c6

Please sign in to comment.