错误全称:"ValueError: This model has not yet been built. Build the model first by calling `build()` or calling `fit()` with some data, or specify an `input_shape` argument in the first layer(s) for automatic build."
使用keras的Sequential()构建模型时遇到此种报错。
单独使用LSTM cell可以跑通,但是使用 Bidirectional(LSTM()) 时会产生如上报错,
在Sequential()后添加 model.build(input_shape=())未能解决问题
改用Model() 模型,使用Input设定输入数据的shape,这样就不再产生报错