widths = tf.abs(tf.expand_dims(w2, axis=0) - tf.expand_dims(
        tf.transpose(w1), axis=1))