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 10, 2022
1 parent c123dde commit 01bb05c
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().to(x.device)
t_horz = torch.tensor(t_horizon).double().to(logits.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().to(x.device)
t_horz = torch.tensor(t_horizon).double().to(logits.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().to(x.device)
t_horz = torch.tensor(t_horizon).double().to(logits.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().to(x.device)
t_horz = torch.tensor(t_horizon).double().to(logits.device)
t_horz = t_horz.repeat(shape.shape[0], 1)

cdfs = []
Expand Down

0 comments on commit 01bb05c

Please sign in to comment.