Skip to content

Commit

Permalink
Update test_generator.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hyunp2 authored Nov 8, 2023
1 parent 9f9f7cb commit 80e4f79
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
from pytest import fixture
from mofa.generator import train_generator, run_generator
import numpy as np
import torch
from

@fixture()
def load_model():
...
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")
ddpm = DDPM.load_from_checkpoint(model, map_location=device).eval().to(device)
return ddpm

def test_training():
...
Expand Down

0 comments on commit 80e4f79

Please sign in to comment.