AI Engineer Cheat Sheet Micro1
AI Engineer Cheat Sheet Micro1
Micro1
1. Deep Learning & Neural Networks
BatchNorm vs LayerNorm: BatchNorm normalizes across batch dimension; LayerNorm
normalizes across features. LayerNorm is better for RNNs/Transformers.
Backpropagation: Computes gradients using the chain rule from output to input, enabling
weight updates via gradient descent.
Dropout: Randomly disables neurons during training to reduce overfitting and improve
generalization.
CNNs vs Dense Networks: CNNs use spatial structure and weight sharing, making them
efficient for image data.
2. PyTorch / TensorFlow
Custom Model in PyTorch: Subclass nn.Module, define layers in __init__, logic in forward().
Train using loss.backward() and optimizer.step().
nn.Module vs nn.functional: Module manages layers; functional offers stateless ops for
flexibility.
Eager vs Graph Mode: Eager = immediate execution (easy debugging); Graph = optimized
static graph (better performance).
3. NLP
RNN vs LSTM vs GRU: LSTM & GRU solve RNN’s long-term dependency issues via gating;
GRU is simpler than LSTM.
Fine-tune BERT: Add classification head, tokenize inputs, train using cross-entropy loss.
OOV Handling: Use subword tokenizers like BPE/WordPiece to reduce OOV impact.
Model Deployment: Save model, wrap in FastAPI, deploy with Docker or cloud service.
Imbalanced Data: Use class weights, resampling, F1-score; avoid accuracy bias.
Model Selection Disputes: Use experiments, explain trade-offs, align with business goals.
Debugging Models: Check data, loss curve, overfitting, tune hyperparameters, try simpler
models.
Interpretability & Ethics: Use SHAP/LIME, test for bias, ensure data transparency.