View source on GitHub |
Saves some frames in a memory efficient way.
tf_agents.replay_buffers.py_hashed_replay_buffer.FrameBuffer()
Thread safety: cannot add multiple frames in parallel.
Methods
add_frame
add_frame(
frame
)
Add a frame to the buffer.
Args | |
---|---|
frame
|
Numpy array. |
Returns | |
---|---|
A deduplicated frame. |
clear
clear()
compress
compress(
observation, split_axis=-1
)
decompress
decompress(
observation, split_axis=-1
)
deserialize
deserialize(
string_value
)
Callback for PythonStateWrapper
to deserialize the array.
on_delete
on_delete(
observation, split_axis=-1
)
serialize
serialize()
Callback for PythonStateWrapper
to serialize the dictionary.
__len__
__len__()