restore tensorflow 1.0rc1 compatibility
@@ -881,6 +881,12 @@ def batch_dot(x, y, axes=None):
if isinstance(axes, int):
axes = (axes, axes)
if ndim(x) == 2 and ndim(y) == 2:
+ if tf_major_version >= 1:
+ if axes[0] == axes[1]:
+ out = tf.reduce_sum(tf.multiply(x, y), axes[0])
+ else:
+ out = tf.reduce_sum(tf.multiply(tf.transpose(x, [1, 0]), y), axes[1])
+ else:
if axes[0] == axes[1]:
out = tf.reduce_sum(tf.mul(x, y), axes[0])
else:
