neural_lam.utils.buffer_list
============================

.. py:module:: neural_lam.utils.buffer_list

.. autoapi-nested-parse::

   Module wrapper exposing a list of tensors as registered buffers.



Classes
-------

.. autoapisummary::

   neural_lam.utils.buffer_list.BufferList


Module Contents
---------------

.. py:class:: BufferList(buffer_tensors: list[torch.Tensor], persistent: bool = True)

   Bases: :py:obj:`torch.nn.Module`


   A list of torch buffer tensors that sit together as a Module with no
   parameters and only buffers.

   This should be replaced by a native torch BufferList once implemented.
   See: https://github.com/pytorch/pytorch/issues/37386

   Register a collection of tensors as buffers inside a module.

   :param buffer_tensors: Buffers to register in the order they should be indexed.
   :type buffer_tensors: Sequence[torch.Tensor]
   :param persistent: If ``True``, buffers are saved in checkpoints. Default ``True``.
   :type persistent: bool, optional


   .. py:attribute:: n_buffers


