Skip to content

Conversation

@cantordust
Copy link
Collaborator

@cantordust cantordust commented Dec 9, 2025

Moving to PyTorch as the Keras backend.

Closes #602

@github-actions
Copy link

github-actions bot commented Dec 9, 2025

Thank you!

Thank you for your pull request 😃

🤖 This automated message can help you check the rendered files in your submission for clarity. If you have any questions, please feel free to open an issue in {sandpaper}.

If you have files that automatically render output (e.g. R Markdown), then you should check for the following:

  • 🎯 correct output
  • 🖼️ correct figures
  • ❓ new warnings
  • ‼️ new errors

Rendered Changes

🔍 Inspect the changes: https://github.com/carpentries-lab/deep-learning-intro/compare/md-outputs..md-outputs-PR-624

The following changes were observed in the rendered markdown documents:

 1-introduction.md | 12 ++++++++----
 2-keras.md        | 40 +++++++++++++++++++++-------------------
 md5sum.txt        |  6 +++---
 setup.md          | 45 ++++++++++++++++++++++-----------------------
 4 files changed, 54 insertions(+), 49 deletions(-)
What does this mean?

If you have source files that require output and figures to be generated (e.g. R Markdown), then it is important to make sure the generated figures and output are reproducible.

This output provides a way for you to inspect the output in a diff-friendly manner so that it's easy to see the changes that occur due to new software versions or randomisation.

⏱️ Updated at 2025-12-09 15:41:19 +0000

@cantordust cantordust linked an issue Dec 9, 2025 that may be closed by this pull request
4 tasks
github-actions bot pushed a commit that referenced this pull request Dec 9, 2025
Copy link
Collaborator

@carschno carschno left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good start, thanks!
I would prefer to not change the X_train and X_test capitalization here because there are many other places in the lesson and in the slides which use it, and they should remain consistent.

from sklearn.model_selection import train_test_split

X_train, X_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=0, shuffle=True, stratify=target)
x_train, x_test, y_train, y_test = train_test_split(features, target, test_size=0.2, random_state=0, shuffle=True, stratify=target)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would prefer X_train/X_test to remain consistent with the capitalization across all episodes.


Keras is a machine learning framework with ease of use as one of its main features.
It is part of the tensorflow python package and can be imported using `from tensorflow import keras`.
It is a standalone python package that supports multiple deep learning frameworks as backends, and it can be imported using `import keras`.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
It is a standalone python package that supports multiple deep learning frameworks as backends, and it can be imported using `import keras`.
It is a Python package that supports multiple deep learning frameworks as backends, and it can be imported using `import keras`.

::: spoiler

### On Linux/macOs
### On Linux/MacOS
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also no need to change this. This is how "macOs" is written, at least nowadays.


## Testing Keras Installation
Keras is available as a module within TensorFlow, as described in the [setup instructions](learners/setup.md#packages).
Keras is available as a standalone package, as described in the [setup instructions](learners/setup.md#packages).
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice catch. Clearly some of the narrative has to be changed too!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Update Keras, use PyTorch instead of Tensorflow

4 participants