Skip to content

Commit

Permalink
Move model to device during infer session
Browse files Browse the repository at this point in the history
  • Loading branch information
golmschenk committed Apr 11, 2024
1 parent 765f6ce commit 7748990
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/qusi/infer_session.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ def get_device() -> Device:
def infer_phase(dataloader, model: Module, device: Device):
batch_count = 0
batches_of_predicted_targets = []
model = model.to(device=device)
model.eval()
with torch.no_grad():
for input_features in dataloader:
Expand Down

0 comments on commit 7748990

Please sign in to comment.