TensorFlow知識點總結

1 iter和next

原文鏈接:https://blog.csdn.net/weixin_43544406/article/details/103091988

2 summary

model = Sequential ([ 
    layers.Dense(256, activation = tf.nn.relu), #[m, 784] => [m,256]
    layers.Dense(128, activation = tf.nn.relu), #[m, 256] => [m,128]
    layers.Dense(64, activation = tf.nn.relu), #[m, 128] => [m,64]
    layers.Dense(32, activation = tf.nn.relu), #[m, 64] => [m,32]
    layers.Dense(10) #[m, 32] => [m,10]  
])
# model = Sequential([
#     layers.Dense(512, activation= tf.nn.relu), #dense 全鏈接
#     layers.Dense(256, activation='relu'),
#     layers.Dense(10)
# ])
model.build(input_shape = [None, 28*28])
model.summary() #打印網絡結構

3 zip

原文鏈接:https://www.cnblogs.com/liuhuacai/p/11732198.html

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章