(vector, matrix)
return squeezed_result
computes x^T A in mini-batches.
computes x^T A in mini-batches.
computes x^T A in mini - batches .
def batched_matrix_vector_multiply(vector, matrix):
    """ computes x^T A in mini-batches. """
    vector_batch_as_matricies = tf.expand_dims(vector, [1])
    mult_result = tf.batch_matmul(vector_batch_as_matricies, matrix)
    squeezed_result = tf.squeeze(mult_result, [1])
    return squeezed_result
def batched_matrix_vector_multiply ( vector , matrix ) : vector_batch_as_matricies = tf . expand_dims ( vector , [ 1 ] ) mult_result = tf . batch_matmul ( vector_batch_as_matricies , matrix ) squeezed_result = tf . squeeze ( mult_result , [ 1 ] ) return squeezed_result