I was wondering if there is an easy way to calculate the dot product of two vectors (i.e. 1-d tensors) and return a scalar value in tensorflow.
Given two vectors X=(
you can use tf.matmul and tf.transpose
tf.matmul(x,tf.transpose(y))
or
tf.matmul(tf.transpose(x),y)
depending on the dimensions of x and y