MartialTerran commited on
Commit
613ec7f
Β·
verified Β·
1 Parent(s): c5a62f5

Update Google-ML-Crash-Course_MNIST_model.py

Browse files
Google-ML-Crash-Course_MNIST_model.py CHANGED
@@ -26,6 +26,31 @@ Softmax The activation function on the output layer that converts the outputs in
26
  In summary:
27
  It's a DNN/MLP: It uses stacked Dense (fully-connected) layers.
28
  It's not a CNN: It lacks Conv2D and MaxPooling2D layers, and it flattens the image data, discarding the crucial 2D spatial information that CNNs are built to exploit.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
  """
30
 
31
  import glob
 
26
  In summary:
27
  It's a DNN/MLP: It uses stacked Dense (fully-connected) layers.
28
  It's not a CNN: It lacks Conv2D and MaxPooling2D layers, and it flattens the image data, discarding the crucial 2D spatial information that CNNs are built to exploit.
29
+
30
+ Model Summary:
31
+ /usr/local/lib/python3.11/dist-packages/keras/src/layers/core/input_layer.py:27: UserWarning: Argument `input_shape` is deprecated. Use `shape` instead.
32
+ warnings.warn(
33
+ Model: "sequential_1"
34
+ ┏━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━━━━━━━━━━┳━━━━━━━━━━━━━━━┓
35
+ ┃ Layer (type) ┃ Output Shape ┃ Param # ┃
36
+ ┑━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━━━━━━━━━━╇━━━━━━━━━━━━━━━┩
37
+ β”‚ dense_3 (Dense) β”‚ (None, 100) β”‚ 78,500 β”‚
38
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
39
+ β”‚ dense_4 (Dense) β”‚ (None, 100) β”‚ 10,100 β”‚
40
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
41
+ β”‚ dropout_1 (Dropout) β”‚ (None, 100) β”‚ 0 β”‚
42
+ β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
43
+ β”‚ dense_5 (Dense) β”‚ (None, 10) β”‚ 1,010 β”‚
44
+ β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”΄β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜
45
+ Total params: 89,610 (350.04 KB)
46
+ Trainable params: 89,610 (350.04 KB)
47
+ Non-trainable params: 0 (0.00 B)
48
+
49
+ Final accuracy (on validation data): 0.96
50
+
51
+ Evaluating on test data...
52
+ Accuracy on test data: 0.96
53
+
54
  """
55
 
56
  import glob