我正在使用Tensorflow Keras模型来评估连续的传感器数据。我的模型输入由15个传感器数据帧组成。因为函数model.predict()花费了将近1秒的时间,所以我想异步执行这个函数,这样我就可以收集这段时间内的下一个数据帧。为此,我创建了一个具有多处理库和用于model.predict的函数的池。我的代码看起来像这样: return model.predict(data)
global
to have shape (None, 5) but got array with shape (200, 1)# Import necessary modulesimport numpy as np # numpy is just used for reading the datafrom keras.layers importDensefrom k
我目前正在训练一个Keras模型,用于分类(20个类),文本分类问题。(X_test)print(f"Accuracy on test set============================ -1s66us/step 10500/10500 ============================== - 1s 80us/step Ker