Training your first Model Flashcards
What’s an epoch?
Epoch: One complete pass through the dataset
What’s the rule of thumb when it comes to deep learning and recognizing categories?
If the human eye can recognize categories from the images, then a deep learning model should be able to do so too
What’s overfitting and why should we avoid it?
It occurs when ML model learns not only the underlying patterns in the training data but also the noise and random fluctuations. As a result, the model performs exceptionally well on the training data but poorly on new, unseen data.
It is crucial to avoid overfitting to ensure that models generalize well and provide reliable predictions in real-world applications.
How can Overfitting be avoided?
- More Training Data
- Simplifying the Model
- Regularization:
- L1 and L2 Regularization: Penalty for large coefficients in the model’s objective function.
- Dropout:
- L1 and L2 Regularization: Penalty for large coefficients in the model’s objective function.
- Cross-Validation
- Early Stopping
- Pruning
- Data Augmentation
Advantages of transfer learning
- Make use of pretrained models
- enables deep learning with small amounts of data
What’s the key to avoid overfitting?
Resampling and test split
How to avoid unintentional overfitting?
Split your data carefully into: train / validation / test sets
Which tasks does the following code snippet accomplish?
learn = vision_learner(dls, resnet34, metrics=error_rate)
Define the metrics to track (here: error rate)
Define a vision learner with a resnet architecture
Which statements are true about a DataLoaders object?
- It downloads the data from an URL
- It contains the training as well as validation data
- It contains the parameters of the final learned model for future access
- It specifies which data to use in training a deep learning model
- It contains the training as well as validation data
- It specifies which data to use in training a deep learning model
Which statements are true about ImageNet?
- It is a classification task with >21k classes
- It is a neural network architecture with >14M parameters
- It contains >14M artificially generated images
- It can be used for pre-training image-based neural networks
- It is a classification task with >21k classes
- It can be used for pre-training image-based neural networks
Can you solve non-image tasks using image classifiers? How well can you expect it to work?
Yes. If the data can be transformed to an image reasonably well, you can then apply standard image classification techniques. It delivers state-of-the-art results in some cases
How can you counter overfitting in deep learning?
Validations sets can reduce the chance to overfit, though they need to be carefully designed for each use case. Otherwise you still may be overfitting unintentionally.
Which library is mentioned as the most popular for low-level deep learning functionality?
A) TensorFlow
B) Keras
C) PyTorch
D) Scikit-learn
Answer: C) PyTorch
What is the primary advantage of using transfer learning with pre-trained models?
A) It reduces the amount of labeled data needed for training.
B) It increases the complexity of the model architecture.
C) It requires extensive training time from scratch.
D) It eliminates the need for a GPU.
Answer: A) It reduces the amount of labeled data needed for training
Given a dataset with 10,000 images, if you use a validation split of 20%, how many images will be used for training and how many for validation?
Training images: = 10,000×0.8=8,000
Validation images: 10,000×0.2=2,000