2020
09-29
09-29
keras处理欠拟合和过拟合的实例讲解
baselineimporttensorflow.keras.layersaslayersbaseline_model=keras.Sequential([layers.Dense(16,activation='relu',input_shape=(NUM_WORDS,)),layers.Dense(16,activation='relu'),layers.Dense(1,activation='sigmoid')])baseline_model.compile(optimizer='adam',loss='binary_crossentropy',metrics=['accuracy','binary_crossentropy'])baseline_model.summary()baseline_history=baseline_mo...
继续阅读 >