[Python] How to check the memory consumption of a Python object?

Discussão em 'Python' iniciado por Stack, Fevereiro 18, 2025.

  1. Stack

    Stack Membro Participativo

    I want to measure the memory consumption of a Python list, where each list member is a tuple, and each tuple has three Pytorch tensors, two being dense and the other being COO sparse.

    I know sys.getsizeof(). But it doesn't work.

    I want a convenient way to get the memory size of the whole list.

    Continue reading...

Compartilhe esta Página