Giter Club home page Giter Club logo

dl-fundamentals's Introduction

Deep Learning Fundamentals: Code Materials and Exercises

This repository contains code materials & exercises for Deep Learning Fundamentals course by Sebastian Raschka and Lightning AI.


For other announcements, updates, and additional materials, you can follow Lightning AI and Sebastian on Twitter!


Links to the materials

Unit 1. Welcome to Machine Learning and Deep Learning [ Link to videos ]

Unit 2. First Steps with PyTorch: Using Tensors [ Link to videos ]

Unit 3. Model Training in PyTorch [ Link to videos ]

Unit 4. Training Multilayer Neural Networks [ Link to videos ]

Unit 5. Organizing your PyTorch Code with Lightning [ Link to videos ]

Unit 6. Essential Deep Learning Tips & Tricks [ Link to videos ]

Unit 7. Getting Started with Computer Vision [ Link to videos ]

Unit 8. Introduction to Natural Language Processing and Large Language Models [ Link to videos ]

Unit 9. Techniques for Speeding Up Model Training [ Link to videos ]

Unit 10. The Finale: Our Next Steps After AI Model Training [ Link to videos ]

dl-fundamentals's People

Contributors

angellmethod avatar arka1112 avatar gegznav avatar jbierba avatar rasbt avatar ssuzana avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dl-fundamentals's Issues

Unused loss computed during test step in 5.3-torchmetrics

During testing, the loss is computed in test_step, but it is not used:

def test_step(self, batch, batch_idx):
loss, true_labels, predicted_labels = self._shared_step(batch)
self.test_acc(predicted_labels, true_labels)
self.log("accuracy", self.test_acc)

One can control loss computation as follows:

    def _shared_step(self, batch, compute_loss=True):
        features, true_labels = batch
        logits = self(features)

        loss = F.cross_entropy(logits, true_labels) if compute_loss else None
        predicted_labels = torch.argmax(logits, dim=1)
        return loss, true_labels, predicted_labels

    def test_step(self, batch, batch_idx):
        _, true_labels, predicted_labels = self._shared_step(batch, compute_loss=False)

Although, for teaching, it's likely simpler to keep _shared_step as is.

Unit05-8 Adding Functionalities with Callback

The slides seem wrong. The slides are inconsistent with the API document about the Callback class.
In the slides:
from pytorch_lightning.callbacks import Callback
Class MyCustomCallback(Callback):
...
In the "Callback API" document:
Class MyCustomCallback(lightning.Callback):
...
I defined MyCustomCallback class for exercise 2 and it give me runtime error at trainer = L.Trainer(...
When I used lightning.Callback, it works.

Unrendered equations in the quizzes

Discussed in #69

Originally posted by Sai-Nandan-Desetti June 30, 2023
The mathematical notation in Quiz: 1.4 The First Machine Learning Classifier. Part 3 isn't rendered. (We get the idea of what it means, nevertheless.)

Minor typo in Pandas URL in section 1.6

On section 1.6 about implementing a perceptron the URL for Pandas documentation has a typo. Instead of being, https://pandas.pydata.or it should have linked to https://pandas.pydata.org/. This is a very minor typo. And thank you for the great job with the course.

[ui] Issues navigating through video sections

Hello, thanks for your course. I appreciate your work. Unfortunately, I ran into two issues navigating the course.

"Next Video" doesn't work.

When you are on the last video of a Unit subsection, there is a "Next Video" button, which is "slick-disabled" in the button class, but in fact, there is no difference from the "Previous Video" button in behavior. It feels like the button isn't working.

image
image

Expected result:
The button either leads to the next video or is missing because the video section is over.

Actual result:
The button is present but doesn't indicate about it can no longer be used.

Quiz number 2 without video 2.

It was kind of a surprise to see two quizzes in the first video. It triggered me to click "Next Video" so I determined that each subsection is represented with multiple videos like that:

image

Expected result:
Clean information about nesting within subsections.
image

Actual result:
image

[ui] Mathematical equations in the exercises show their LaTeX formats.

Hi, I am currently pursuing this course and found it really great. The exercises at the end of each units/sub-units is a great addition in order to check the understanding. However I found out that the equations in the exercises are still in their LaTeX format.

Here's an example:
Screenshot from 2023-04-06 21-10-10

The expected notation should be $x_{3}^{[5]}$

[ui] Reporting Quiz 4.1 (PART 4) UI Issue

Thank you for the aswesome courses. I wanted to express my appreciation for the engaging quizzes and exercises provided for each unit. They have been instrumental in keeping me motivated and actively learning throughout the course.

However, while working on Quiz 4.1, I came across a UI error that I would like to bring to your attention. Here are the specifies of the error:

Quiz 4.1, Dealing with More than Two Classes: Softmax Regression (PART 4) quiz option buttons don't work

When attempting to click my anwers for Quiz 4.1 (PART 4), I noticed that the "Radio button" options are unresponsive due to typo coding in UI. Therefore, clicking on the button does not trigger any action. I have attached a screenshot of the unresponsive "Radio buttion" option page for your reference.

ui _quiz_error

Expected result:

  • Ability to click on audio buttons
  • Concise text answer options for questions

Actual result:

  • The button does not trigger any action
  • Typo text included in text answer options e.g. 1,-0,-0,-0,-0 -1" name="question-1" value=" 1,-0,-0,-0,-0 -1"> 1,-0,-0,-0,-0 -1"> 1, 0, 0, 0, 0

P.S. During the process of identifying and investigating a UI issue, I unintentionally discovered a method to easily bypass the correct answers in a quiz, enabling me to easily find out the answers. It may be necessary to implement measures to prevent such an approach.

`ZeroDivisionError` in 8.2, 8.7 and other

On my Windows 10, with Python 3.11 and:

torch       : 2.1.2+cu121
transformers: 4.37.2
datasets    : 2.17.0
lightning   : 2.1.3

The code in many files of sections 8.2 and 8.7:

download_dataset()

df = load_dataset_into_to_dataframe()
partition_dataset(df)

result in:

     19 duration = time.time() - start_time
     20 progress_size = int(count * block_size)
---> 21 speed = progress_size / (1024.0**2 * duration)
     22 percent = count * block_size * 100.0 / total_size
     24 sys.stdout.write(
     25     f"\r{int(percent)}% | {progress_size / (1024.**2):.2f} MB "
     26     f"| {speed:.2f} MB/s | {duration:.2f} sec elapsed"
     27 )

ZeroDivisionError: float division by zero

I did not check other units yet.

The problem is that the computed difference in time is 0, so this creates the error.

5.4 part 2

The answer is incorrect. I think I did correct, but the feedback said it is "incorrect."

Quizzes report FP but do not report FN when multiple answers are valid

Discussed in #17

Originally posted by agaldran January 16, 2023
Just as the title shows, if a valid answer is not marked, this error will not be reported and we don't know we got it wrong, see below:

image

Above, the first option was also a valid answer, I did not mark it, but this was not repored as incorrect.

Thanks for the materials!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.