X @ tf.transpose(x)

tf.transpose is converting rows to columns and columns to rows but what is x @ tf.transpose(x) as it doesn’t give similar results.
x = tf.constant([[1., 2., 3.],
[4., 5., 6.]])
x @ tf.transpose(x)

Answer:
<tf.Tensor: shape=(2, 2), dtype=float32, numpy=
array([[14., 32.],
[32., 77.]], dtype=float32)>

I figured it out:

@ used for matrix multiplication. Whatever value you assign to x, it gets multiplied with its own transpose.

1 Like