TensorFlow2入门与实践
深度学习基础和 tf.keras
顺序模型:有一个输入和一个输出,他们之间的网络是顺序搭建的
Dense层:即y=ax+b
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15
| import tensorflow as tf model = tf.keras.Sequential() model.add(tf.keras.layers.Dense(1, input_shape=(1,))) model.summary()
Model: "sequential" _________________________________________________________________ Layer (type) Output Shape Param ================================================================= dense (Dense) (None, 1) 2 ================================================================= Total params: 2 Trainable params: 2 Non-trainable params: 0 _________________________________________________________________
|