Tensor.memoryFootprint

Tensor.memoryFootprint()

get the size (in byte) of the Tensor representation in memory

Returns:

the size in byte of the representation of the Tensor in memory.

Return type:

int

Example

import pyagrum as gum

a, b = gum.LabelizedVariable("a", "a", 2), gum.LabelizedVariable("b", "b", 3)
p = gum.Tensor().add(a).add(b).fillWith([1, 2, 3, 4, 5, 6])
p.memoryFootprint() > 0
# True

Class

Tensor