AI Coding · Amazon · Medium
Implement three core building blocks of modern neural networks from scratch using NumPy. You must handle batching and ensure numerical stability throughout without relying on high-level frameworks (e.g., TensorFlow or PyTorch). Every function must be fully vectorized: rely on broadcasting, np.matmul/einsum, and axis-aware reductions; no explicit loops over batch or sequence dimensions are permitted. Sigmoid Given a tensor x of any shape, compute the element-wise logistic…