Deep Learning Exam Notes Overview
Deep Learning Exam Notes Overview
Convolutional layers in a CNN extract local features from the input data by applying convolution operations that learn spatial hierarchies . Pooling layers follow convolutional layers to reduce the dimensionality of feature maps, retaining essential information while minimizing overfitting through operations like max pooling or average pooling . Fully connected layers, placed at the end of the network, integrate the features learned from previous layers to output predictions or classifications .
Reinforcement learning (RL) differs from other machine learning paradigms in that an agent learns to make decisions by interacting with the environment, receiving feedback in the form of rewards or penalties, rather than directly learning from labeled input-output pairs . Unique challenges in RL include the exploration-exploitation trade-off, where the agent must decide between exploring new actions to obtain more information or exploiting known actions to maximize reward. Additionally, RL must handle delayed rewards, requiring the agent to predict the long-term impact of actions .
Dropout helps prevent overfitting by randomly turning off neurons during training, which forces the network to learn more robust features instead of relying on any individual neuron . Data augmentation artificially expands the training dataset by applying transformations such as rotations or translations on existing data, increasing model generalization by ensuring that learned features are not specific to the exact training examples but extend to a wider array of inputs . These techniques collectively contribute to building models that generalize better to unseen data.
Stochastic Gradient Descent (SGD) updates model weights iteratively based on a random subset of data, providing a noisy approximation of the gradient which can help escape local minima. Momentum improves upon SGD by accumulating a velocity vector in the direction of persistent reduction, thereby smoothing and accelerating convergence . Adam combines the advantages of both Momentum and RMSProp by adapting the learning rate for each parameter through an estimate of first and second moments of the gradients, offering effective training with less hyperparameter tuning .
Common activation functions used in neural networks include Sigmoid, Tanh, ReLU, and Softmax . Sigmoid maps input to an output between 0 and 1, which is suitable for binary classification problems but can suffer from saturation. Tanh outputs between -1 and 1, offering better convergence than Sigmoid. ReLU introduces non-linearity and is less susceptible to gradient saturation, enabling faster learning. Softmax is used in the output layer of classification networks to convert logits to probabilities .
The primary challenges with training RNNs include issues like vanishing gradients, which affect the network's ability to learn long-range dependencies . LSTM (Long Short-Term Memory) networks address this by incorporating memory cells capable of preserving gradients across long sequences, thus maintaining information over longer periods . Similarly, GRUs (Gated Recurrent Units) simplify LSTMs by reducing the number of gates, which makes training more efficient while still mitigating vanishing gradient problems .
CNNs are particularly advantageous in computer vision due to their ability to capture spatial hierarchies in images through convolutional operations that learn diverse features such as edges and textures in layered complexity . Their hierarchical structuring allows CNNs to maintain spatial relationships by using fewer parameters through weight sharing, which is crucial for efficiency in handling high-dimensional visual data. For tasks like image classification and object detection, CNNs utilize convolutional and pooling layers to down-sample input dimensions while preserving essential information for accurate predictions . These properties make CNNs highly efficient and effective for analyzing and classifying visual data.
Major frameworks used in deep learning include TensorFlow, PyTorch, and Keras . TensorFlow is favored for its static computation graph ethos, making it production-ready with optimizations for deployment. PyTorch, with its dynamic computation graph, is more research-friendly as it offers intuitive coding which is closer to standard Python syntax, aiding rapid prototyping. Keras, as a high-level API, is built on top of these frameworks to facilitate quick model building and testing, thus making it attractive for educational purposes and initial model development .
Seq2Seq (Sequence-to-Sequence) models enable the transformation of an input sequence to a different output sequence using encoder-decoder architecture, which is particularly effective in tasks like translation and summarization . BERT (Bidirectional Encoder Representations from Transformers) advances beyond Seq2Seq by incorporating bidirectional training of Transformer models, allowing it to capture context from both directions in pre-trained language representations, thus achieving superior performance in a multitude of NLP tasks by understanding nuanced context and polysemy .
Deep learning differs from traditional machine learning primarily in its ability to automatically extract features from raw data, eliminating the need for manual feature engineering which is usually required in traditional ML approaches . Deep learning is particularly suited for tasks like computer vision, speech recognition, and NLP because it can handle complex structures in data through deep neural networks, which efficiently process high-dimensional inputs typical in these areas, such as images, sound waves, and text .