Skip to content

Commit

Permalink
sample without replacement
Browse files Browse the repository at this point in the history
  • Loading branch information
rakow committed Sep 10, 2024
1 parent a46b20b commit 1aa0acc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion matsim/scenariogen/network/run_opt_freespeed.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ def main(args):
for j in range(batches):
key = random.PRNGKey(r.getrandbits(31))

idx = random.choice(key, jnp.arange(0, xs.shape[0]), shape=(batch_size,))
idx = random.choice(key, jnp.arange(0, xs.shape[0]), replace=False, shape=(batch_size,))

grads = m.loss(m.params, xs[idx], ys[idx])

Expand Down

0 comments on commit 1aa0acc

Please sign in to comment.