Home > other >  TensorFlow2 classifying images in the tutorial model how to understand?
TensorFlow2 classifying images in the tutorial model how to understand?

Time:03-08

 
The model=keras. Sequential ([
Keras. The layers. Flatten (input_shape=(28, 28)),
Keras. The layers. Dense (128, activation='relu'),
Keras. The layers. Dense (10)
])


Tutorial:
The first floor of the network tf. Keras. The layers. Flatten image formats from two-dimensional array (28 x 28 pixels) into a one-dimensional array (28 28=x 784 pixels), the layer is regarded as the image pixel row not stack and arrange it, no parameters to study the layer, it will only to reformat the data,
After flattening pixels, the network will include two tf. Keras. The layers. The sequence of Dense layer, they are Dense connection or connection nerve layer, the first layer Dense with 128 nodes (or neurons), the second (and final) layer returns an array of length of 10 logits, each node contains a score, used to represent the current image belong to which class ten in the class, and

I want to ask next, 1. The second floor. There are 128 nodes, why is 128, not 64 or any other, is how to 128?
2. Why the last layer will return an array of length of 10 logits

Have bosses can explain, thank you very much,
  • Related