ML coding
Machine learning algorithms and model parts written from scratch in NumPy and PyTorch, as ML coding rounds ask.
Machine learning algorithms and model parts written from scratch in NumPy and PyTorch, as ML coding rounds ask.
3 write-ups
| Title |
|---|
| Numerical Stability Why exp overflows and log underflows, and the fixes interviewers look for: log-sum-exp, stable softmax and sigmoid, losses from logits, sized epsilons, and float16 and bfloat16 pitfalls. |
| Logistic Regression Logistic regression in NumPy, from loops to a stable vectorized fit with the loss computed from logits, then softmax for many classes, with tests and the versus-neural-network question. |
| Softmax and Cross-Entropy A stable softmax and cross-entropy in NumPy, from the formula that overflows to log-sum-exp, the combined gradient with respect to the logits, label smoothing and one gradient step. |