Hi there!
Is there a possibility to get a tensors memory address? Like an equivalent to torch’s .data_ptr()
?
Thanks in advance!
Hi there!
Is there a possibility to get a tensors memory address? Like an equivalent to torch’s .data_ptr()
?
Thanks in advance!
You can access the memory address of a tensor using the id()
function.
import tensorflow as tf
a = tf.constant([1, 2, 3])
memory_address=hex(id(a))
Thank you!