InvalidArgumentError: Tensor holds the wrong type, it holds double, but desires to be float.
Created by: xttian
报错信息: InvalidArgumentError: Tensor holds the wrong type, it holds double, but desires to be float. [Hint: Expected valid == true, but received valid:0 != true:1.] at (/paddle/paddle/fluid/framework/tensor_impl.h:33) [operator < cross_entropy > error]
关键代码: pred_tags = fluid.layers.sigmoid(x=bi_lstm_x) real_tags = fluid.layers.data(name="real_tags", shape=[_TEXT_LEN, _TAG_DIM], dtype="float32", lod_level=1) loss = fluid.layers.cross_entropy(input=pred_tags, label=real_tags, soft_label=True)