错误:TypeError: Input 'b' of 'MatMul' Op has type float32 that does not match type int32 of argument 'a'.
解决方法:构造,转换成同类型
#训练预测
import tensorflow
x_train_float32 = tensorflow.cast(x_train, tensorflow.float32)
y_train_predict = model.predict_classes(x_train_float32)
print(y_train_predict)
参考资料:
https://stackoverflow.com/questions/50678620/typeerror-input-b-of-matmul-op-has-type-float32-that-does-not-match-type-in
https://blog.csdn.net/forever0_0love/article/details/81193589