Missed TensorFlow Dev Summit? Check out the video playlist. Watch recordings

tf_agents.replay_buffers.py_hashed_replay_buffer.FrameBuffer

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

__len__

View source

__len__()

add_frame

View source

add_frame(
    frame
)

Add a frame to the buffer.

Args:

  • frame: Numpy array.

Returns:

A deduplicated frame.

clear

View source

clear()

compress

View source

compress(
    observation, split_axis=-1
)

decompress

View source

decompress(
    observation, split_axis=-1
)

deserialize

View source

deserialize(
    string_value
)

Callback for PythonStateWrapper to deserialize the array.

on_delete

View source

on_delete(
    observation, split_axis=-1
)

serialize

View source

serialize()

Callback for PythonStateWrapper to serialize the dictionary.