在 tf.keras 接口中,sequence 序列模型用 InputLayer 但是 fuctional API 用 Input()
input_ = tf.keras.layers.Input(shape=X_train.shape[1:])
hidden1 = tf.keras.layers.Dense(30, activation="relu")(input_)
hidden2 = tf.keras.layers.Dense(30, activation="relu")(hidden1)
concat_ = tf.keras.layers.Concatenate()([input_, hidden2])
output_ = keras.layers.Dense(1)(concat_)
model = tf.keras.Model(inputs=[input_], outputs=[output_])
标签:layers,tfrecord,Dense,keras,Keras,input,tf,Input,输入
From: https://www.cnblogs.com/Gelthin2017/p/17231704.html