Commit 977e708
[EXTERNAL] docs(keras2): use categorical_crossentropy for single-label multi-class (#3048)
* [EXTERNAL] fix(numpy): clarify that CSV header is excluded when loading data
### Fix ambiguous instruction about row indexing
#### What changed
The sentence:
> "Load the data using genfromtxt, specifying the delimiter as ';', and optimize the numpy array size by reducing the data types. Use np.float32 and verify that the resulting numpy array weighs 76800 bytes."
was unclear about whether the CSV header should be skipped or not.
It now says:
> "Load the data using genfromtxt, specifying the delimiter as ';' with excluding the headers, and optimize the numpy array size by reducing the data types. Use np.float32 and verify that the resulting numpy array weighs 76800 bytes."
#### Why
Later instructions refer to specific row numbers (like the 2nd, 7th, and 12th rows). Without stating whether the header counts as a row, the meaning is ambiguous — it affects the indexing. This fix makes it clear that the header should be excluded.
#### No code changes
This is a documentation fix only.
* docs(keras2): use categorical_crossentropy for single-label multi-class in Exercise 4
## Summary
Docs-only fix in **Keras 2 → Exercise 4 (Multi-class classification – Optimize)**:
Replace the incorrect mention of `binary_crossentropy` with the correct `categorical_crossentropy` for **single-label multi-class** classification.
## Why
`binary_crossentropy` is intended for **binary** or **multi-label** tasks.
For **single-label multi-class** with a softmax output, the appropriate loss is **`categorical_crossentropy`**. This correction prevents learner confusion and aligns the subject with standard Keras practice.
## Scope of Change
* **Updated text** in Exercise 4 to say `categorical_crossentropy` instead of `binary_crossentropy`.
* Update README.md
---------
Co-authored-by: Abdelhak ELYakoubi <87140828+EldritchGriffin@users.noreply.github.com>1 parent 5742b16 commit 977e708
2 files changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
136 | 136 | | |
137 | 137 | | |
138 | 138 | | |
139 | | - | |
| 139 | + | |
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
296 | 296 | | |
297 | 297 | | |
298 | 298 | | |
299 | | - | |
| 299 | + | |
300 | 300 | | |
301 | 301 | | |
302 | 302 | | |
| |||
0 commit comments