Skip to content

Commit 0a79308

Browse files
authored
Move to CPU first (#1515)
1 parent ba21414 commit 0a79308

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

sbi/utils/simulation_utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ def simulate_for_sbi(
7979
# The batch size will be an approximation, since np.array_split does
8080
# not take as argument the size of the batch but their total.
8181
num_batches = num_simulations // simulation_batch_size
82-
batches = np.array_split(theta.numpy(), num_batches, axis=0)
82+
batches = np.array_split(theta.cpu().numpy(), num_batches, axis=0)
8383
batch_seeds = np.random.randint(low=0, high=1_000_000, size=(len(batches),))
8484

8585
# define seeded simulator.

0 commit comments

Comments
 (0)