更新时间:2023-12-03 11:14:04
在完成预处理之后,可以通过调用Input
After you are done with pre-processing, You can add the tensor as input layer by calling tensor
param of Input
所以在您的情况下:
tf_embedding_input = ... # pre-processing output tensor
# Keras model
model = Sequential()
model.add(Input(tensor=tf_embedding_input))
model.add(Embedding(max_features, 128, input_length=maxlen))