我想通过掩码矩阵将INF值设置为矩阵,就像pytorch代码一样: scores.data.masked_fill_(y_mask.data, -float('inf')). 我尝试使用 tf.map_fn 来实现它,但性能太慢了。
確定! 回上一頁