When you are facing bugs like:
Assertion failed: (dimensions_match(m_leftImpl.dimensions(), m_rightImpl.dimensions())), function TensorEvaluator, file include/eigen3/unsupported/Eigen/CXX11/src/Tensor/TensorEvaluator.h, line 392.
Check if you made mistake in transposing a matrix's dimension multi-times.
t_rel_logits = dy.transpose(rel_logits, [1, 0, 0])