Skip to content

Commit

Permalink
Update losses.py
Browse files Browse the repository at this point in the history
  • Loading branch information
Chirag Nagpal authored Jul 9, 2022
1 parent e2c619e commit c123dde
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions auton_survival/models/dsm/losses.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ def _weibull_pdf(model, x, t_horizon, risk='1'):
k_ = shape
b_ = scale

t_horz = torch.tensor(t_horizon).double()
t_horz = torch.tensor(t_horizon).double().to(x.device)
t_horz = t_horz.repeat(shape.shape[0], 1)

pdfs = []
Expand Down Expand Up @@ -338,7 +338,7 @@ def _weibull_cdf(model, x, t_horizon, risk='1'):
k_ = shape
b_ = scale

t_horz = torch.tensor(t_horizon).double()
t_horz = torch.tensor(t_horizon).double().to(x.device)
t_horz = t_horz.repeat(shape.shape[0], 1)

cdfs = []
Expand Down Expand Up @@ -401,7 +401,7 @@ def _lognormal_cdf(model, x, t_horizon, risk='1'):
k_ = shape
b_ = scale

t_horz = torch.tensor(t_horizon).double()
t_horz = torch.tensor(t_horizon).double().to(x.device)
t_horz = t_horz.repeat(shape.shape[0], 1)

cdfs = []
Expand Down Expand Up @@ -438,7 +438,7 @@ def _normal_cdf(model, x, t_horizon, risk='1'):
k_ = shape
b_ = scale

t_horz = torch.tensor(t_horizon).double()
t_horz = torch.tensor(t_horizon).double().to(x.device)
t_horz = t_horz.repeat(shape.shape[0], 1)

cdfs = []
Expand Down

0 comments on commit c123dde

Please sign in to comment.