Tensorflow2.0實例化 Model 的兩種方式

一、在「函數式API」中,從「輸入層」開始,當前層的輸入層是前一層的輸出層,最後用輸入層和輸出層建立模型:python inputs = tf.keras.Input(shape=(28,28,1)) x = Conv2D(32,3,activation='relu')(inputs) x = Flatten()(x) x = Dense(128,activation='relu')(x) out
相關文章
相關標籤/搜索