14. Tensorflow functional model: multiply layers
ฝัง
- เผยแพร่เมื่อ 25 ธ.ค. 2024
- #tensorflow #keras #tutorial #machinelearning #neuralnetworks #deeplearning
net={}
net[0]= layers.Input((10,))
net[1]= layers.Dense(16, activation='relu')(net[0])
net[2]= layers.Dense(32, activation='relu')(net[1])
net[3]= layers.Dense(64, activation='relu')(net[2])
net[4]= layers.Dense(32, activation='relu')(net[3])
net[4.5]= layers.Multiply()([net[2], net[4]])
net[5]= layers.Dense(16, activation='relu')(net[4.5])
net[6]= layers.Dense(1, activation='relu')(net[5])
model= keras.models.Model(net[0],net[6])