Skip to content

Commit

Permalink
replace check for empty tensor.
Browse files Browse the repository at this point in the history
  • Loading branch information
rtqichen committed Feb 13, 2019
1 parent a344d75 commit 714b6c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchdiffeq/_impl/adjoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def augmented_dynamics(t, y_aug):
time_vjps.append(dLd_cur_t)

# Run the augmented system backwards in time.
if len(adj_params) == 0:
if adj_params.numel() == 0:
adj_params = torch.tensor(0.).to(adj_y[0])
aug_y0 = (*ans_i, *adj_y, adj_time, adj_params)
aug_ans = odeint(
Expand Down

0 comments on commit 714b6c4

Please sign in to comment.