title: How to multiply and reduce_max efficiently in Tensorflow?
body: <p>I have 2 variables A and B with shapes (N,M) and (M,K).
  I can calculate <code>C = tf.matmul(A, B)</code> and get new matrix C with shape (N, K).
  Or I can rewrite this as <code>C = tf.reduce_sum(tf.expand_dims(A, -1) * tf.expand_dims(B, 0), 1)</code>. Obviously, that expression is slower and requires much more memory to calculate.</p>
  
  <p>I'd like to calculate <code>C = tf.reduce_max(tf.expand_dims(A, -1) * tf.expand_dims(B, 0), 1)</code>. Kinda multiply two matrices, but set new element C<sub>i,j</sub> = max<sub>k</sub>(A<sub>i,k</sub>*B<sub>k,j</sub>). Is there any optimized form of this similar to <code>tf.matmul</code>?</p>