# 模型搭建model = tfkerasSequential PolynomialFeaturesdegree=4 include_bias=False input_shape=train_datasetshape-2 tfkeraslayersFlatten tfkeraslayersDense32 activation=tanh tfkeraslayersDense1
import tensorflow as tf from tensorflow.keras.layers import Flatten, Dense from tensorflow.keras.activations import tanh, leaky_relu
model = tf.keras.Sequential([ tf.keras.layers.PolynomialFeatures(degree=4, include_bias=False, input_shape=train_dataset.shape[-2:]), Flatten(), Dense(32, activation=tanh), Dense(16, activation=tanh), Dense(32, activation=leaky_relu), Dense(16, activation=leaky_relu), Dense(16, activation=tanh), Dense(4, activation='linear') ])
原文地址: https://www.cveoy.top/t/topic/hSBf 著作权归作者所有。请勿转载和采集!