Returns memory info at the current time in the program. The result is an
object with the following properties:
numBytes: Number of bytes allocated (undisposed) at this time.
numTensors: Number of unique tensors allocated.
numDataBuffers: Number of unique data buffers allocated
(undisposed) at this time, which is ≤ the number of tensors
(e.g. a.reshape(newShape) makes a new Tensor that shares the same
data buffer with a).
unreliable: True if the memory usage is unreliable. See reasons when
unreliable is true.
reasons: string[], reasons why the memory is unreliable, present if
unreliable is true.
WebGL Properties:
numBytesInGPU: Number of bytes allocated (undisposed) in the GPU only at
this time.
Returns memory info at the current time in the program. The result is an object with the following properties:
numBytes
: Number of bytes allocated (undisposed) at this time.numTensors
: Number of unique tensors allocated.numDataBuffers
: Number of unique data buffers allocated (undisposed) at this time, which is ≤ the number of tensors (e.g.a.reshape(newShape)
makes a new Tensor that shares the same data buffer witha
).unreliable
: True if the memory usage is unreliable. Seereasons
whenunreliable
is true.reasons
:string[]
, reasons why the memory is unreliable, present ifunreliable
is true.WebGL Properties:
numBytesInGPU
: Number of bytes allocated (undisposed) in the GPU only at this time.