cannot compute MatMul as input #0 was expected to be a double tensor but is a float tensor [Op:MatMul] name: MatMul/ 将输入转成tf.float32即可 var pred =tf.add(tf.matmul( BGinputs.numpy().astype(tf.float32) , Weight.numpy().astype(tf.float32)),bias.numpy().astype(tf.float32)); Filed under: C#,TensorFlow,人工智能,编程 - @ 2023年5月26日 上午8:54