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

tf_agents.metrics.py_metrics.NumpyDeque

View source on GitHub

Deque implementation using a numpy array as a circular buffer.

Inherits From: NumpyState

tf_agents.metrics.py_metrics.NumpyDeque(
    maxlen, dtype
)

Args:

  • maxlen: Maximum length of the deque before beginning to evict the oldest entries. If np.inf, deque size is unlimited and the array will grow automatically.
  • dtype: Data type of deque elements.

Methods

__len__

View source

__len__()

add

View source

add(
    value
)

clear

View source

clear()

extend

View source

extend(
    values
)

mean

View source

mean(
    dtype=None
)