def _weighted_loss(loss, weight):
"""Returns cumulative weighted loss as 1d `Tensor`."""
with ops.name_scope(None, "weighted_loss", (loss, weight)) as name:
return math_ops.multiply(
array_ops.reshape(loss, shape=(-1,)),
array_ops.reshape(weight, shape=(-1,)),
name=name)
head.py 文件源码
python
阅读 23
收藏 0
点赞 0
评论 0
评论列表
文章目录