Skip to content

Commit

Permalink
Fix TF Lite unsupported operation
Browse files Browse the repository at this point in the history
  • Loading branch information
m-wojnar committed Jul 15, 2023
1 parent 7a423aa commit bdc4d0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion reinforced_lib/utils/experience_replay.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ def sample(buffer: ReplayBuffer, key: PRNGKey) -> Tuple:
Tuple containing the batch of states, actions, rewards, terminals and next states.
"""

idxs = jax.random.randint(key, shape=(batch_size,), minval=0, maxval=buffer.size)
idxs = jax.random.uniform(key, shape=(batch_size,), minval=0, maxval=buffer.size).astype(jnp.int32)

states = buffer.states[idxs]
actions = buffer.actions[idxs]
Expand Down

0 comments on commit bdc4d0c

Please sign in to comment.