Skip to content Skip to sidebar Skip to footer
Showing posts with the label Tensor

Pytorch: Why Is The Memory Occupied By The `tensor` Variable So Small?

In Pytorch 1.0.0, I found that a tensor variable occupies very small memory. I wonder how it stores… Read more Pytorch: Why Is The Memory Occupied By The `tensor` Variable So Small?

Top K Indices Of A Multi-dimensional Tensor

I have a 2D tensor and I want to get the indices of the top k values. I know about pytorch's to… Read more Top K Indices Of A Multi-dimensional Tensor

Keras Tensors - Get Values With Indices Coming From Another Tensor

Suppose I have these two tensors: valueMatrix, shaped as (?, 3), where ? is the batch size ind… Read more Keras Tensors - Get Values With Indices Coming From Another Tensor

Understanding Jacobian Tensor Gradients In Pytorch

I was going through official pytorch tut, where it explains tensor gradients and Jacobian products … Read more Understanding Jacobian Tensor Gradients In Pytorch

How To Conditionally Scale Values In Keras Lambda Layer?

The input tensor rnn_pv is of shape (?, 48, 1). I want to scale every element in this tensor, so I … Read more How To Conditionally Scale Values In Keras Lambda Layer?

Tensorflow2: How To Print Value Of A Tensor Returned From Tf.function When Eager Execution Is Disabled?

I've read that I can see contents of tf variables by using tf.print inside my tf.function defin… Read more Tensorflow2: How To Print Value Of A Tensor Returned From Tf.function When Eager Execution Is Disabled?

How To Dynamically Index The Tensor In Pytorch?

For example, I got a tensor: tensor = torch.rand(12, 512, 768) And I got an index list, say it is:… Read more How To Dynamically Index The Tensor In Pytorch?

How To Construct Square Of Pairwise Difference From A Vector In Tensorflow?

I have a 1D vector having N dimension in TensorFlow, how to construct sum of a pairwise squared dif… Read more How To Construct Square Of Pairwise Difference From A Vector In Tensorflow?