3 python casting keras tensorflow tensor
这是来自自定义 Keras 回调 casted=K.cast((yPred), K.tf.int32)
我绝对需要将 yPred(一个张量)转换为 int32 类型(该转换应用于张量内容,我知道)
尽管如此,K.cast 只允许转换为浮点数。
我该如何解决问题?
Dan*_*ler 5
这是你如何做到的:
casted = K.cast(yPred,"int32")
归档时间:
7 年,6 月 前
查看次数:
5847 次
最近记录:
6 年,4 月 前