def tf_static_adem_l1_loss(human_score, model_score, M, N):
hs_shape = human_score.get_shape().as_list()
ms_shape = model_score.get_shape().as_list()
with tf.control_dependencies(
[tf.assert_equal(len(hs_shape), 1, message='score should be 1D.'),
tf.assert_equal(len(ms_shape), 1, message='score should be 1D.'),
tf.assert_equal(hs_shape, ms_shape,
message='human and model scores should have an equal amount.')]):
return compute_adem_l1_loss(human_score, model_score, M, N)
评论列表
文章目录