Skip to content

Commit 386ba57

Browse files
committed
Use softmax
1 parent e81bceb commit 386ba57

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

05b - Convolutional Neural Networks (Tensorflow).ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@
171171
"\n",
172172
"# Now we'll flatten the feature maps and generate an output layer with a predicted probability for each class\n",
173173
"model.add(Flatten())\n",
174-
"model.add(Dense(train_generator.num_classes, activation='sigmoid'))\n",
174+
"model.add(Dense(train_generator.num_classes, activation='softmax'))\n",
175175
"\n",
176176
"# With the layers defined, we can now compile the model for categorical (multi-class) classification\n",
177177
"model.compile(loss='categorical_crossentropy',\n",

0 commit comments

Comments
 (0)