Skip to content

Commit

Permalink
Merge pull request #27 from instadeepai/fix/prioritised-sampling-with…
Browse files Browse the repository at this point in the history
…-batch-of-1

fix: be explicit about squeeze dim in prioritised sampling to avoid flattening (1,1) arrays
  • Loading branch information
EdanToledo authored Jul 4, 2024
2 parents c72a39b + bc689c0 commit 3c74aa8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion flashbax/buffers/sum_tree.py
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ def stratified_sample(
)

return jax.vmap(sample, in_axes=(None, None, 0))(
state, None, query_values.squeeze()
state, None, query_values.squeeze(axis=-1)
)


Expand Down

0 comments on commit 3c74aa8

Please sign in to comment.