All questions
Showing of 48What is a perceptron, and what can a single-layer network actually do?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
A perceptron is the simplest neural unit. It multiplies each input by a weight, sums the results, adds a bias, then passes that total through a step threshold. Output is one or zero. Training nudges weights whenever a prediction is wrong, moving the boundary toward the mistaken example.
What a single layer can do is draw one straight boundary through the input space. That handles linearly separable problems like AND and OR. It cannot solve XOR, because no single line separates those four points.
This limit is why depth exists. Stacking units with a hidden layer between them lets the network bend the boundary into arbitrary shapes. The cost is that the simple perceptron update no longer works, so you need gradient-based training instead.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What are the input, hidden and output layers of a neural network?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Every network is organized into three kinds of layer, each with a fixed job. The input layer is not really computing anything. It simply holds your features, one unit per number you feed in - pixel values, sensor readings, or an encoded row.
Hidden layers sit in the middle and do the actual work. Each one takes the previous layer's outputs, applies weights, and produces a new representation. Early hidden layers pick up simple patterns. Later ones combine those into higher-level features.
The output layer is shaped by the task. One unit for a regression target or binary score, ten units for ten classes. Get that shape wrong and the loss function will not match your labels, which is a common early bug.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is an activation function, and what does it do inside a neuron?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
An activation function is the small transform a neuron applies to its weighted sum before passing the value on. The neuron first computes inputs times weights plus bias. That number then goes through the activation, and the result becomes the neuron's output.
Two things happen there. The function bends the straight-line arithmetic, so stacked layers can represent curved decision boundaries. It also controls the range of the signal - squashed between zero and one, or clipped at zero, depending on which function you pick.
The choice has a real training cost. Because backpropagation multiplies the activation's slope at every layer, a function that flattens out will shrink gradients as they travel backwards. The rectified linear unit (ReLU) stays popular partly because its slope is exactly one wherever the input is positive.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is backpropagation, and how does it compute gradients through a network?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Backpropagation is how a network works out, for every weight, whether nudging it up or down would reduce the loss. It runs after a forward pass. The forward pass computes predictions and stores each layer's intermediate values along the way.
Then the loss gradient flows backwards, layer by layer. At each step the chain rule from calculus combines the gradient arriving from above with the local derivative of that layer. Multiply them and you get the gradient for that layer's weights, plus the signal to hand to the layer below.
The practical cost is memory. All those stored activations sit in graphics processing unit (GPU) memory until the backward pass consumes them. That is why a batch that fits during inference can still blow up during training.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is gradient descent, and what is the intuition behind the algorithm?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Gradient descent finds good weights by repeatedly stepping downhill on the loss surface. Picture the loss as a landscape where every position is one setting of the weights. The gradient points in the direction of steepest increase, so you move the opposite way.
One iteration is three moves: run data through the network, measure the loss, then subtract a fraction of each gradient from its weight. Repeat over many passes and the weights drift toward a region where the loss stops improving.
Nothing about this guarantees the lowest possible point. You only ever see the slope directly under your feet, never the whole map. In practice that is acceptable, because a good-enough valley found in hours beats a perfect one you never reach.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What does the learning rate control, and what goes wrong at either extreme?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
The learning rate sets how far each weight moves along its gradient on every update. The gradient gives the direction. The learning rate gives the step size. It is usually the first thing to tune, because a wrong value ruins a run no matter how good the architecture is.
Set it too high and the steps overshoot the valley. Loss jumps around, or shoots to not-a-number as weights blow up. Set it too low and training crawls. You burn hours of compute and may stall on a flat stretch before reaching anything useful.
Most teams start around 0.001 with Adam, watch the first few hundred steps, then adjust by factors of ten. Decaying the rate later in training helps the weights settle instead of bouncing near the bottom.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
Which hyperparameters do you tune when training a neural network, and what does each control?
Answer it yourself first - out loud, or typed below.
How should your speech become text?
Listening… your words appear above as you speak - tap Stop when you're done.
Recording · cr - tap Stop & transcribe when you're done.
Transcribing with AI…
Voice:
Last attempt -
Hyperparameters are the knobs you set before training starts, as opposed to weights, which the training learns. A handful matter far more than the rest.
- Learning rate: the size of each weight update, and by far the most sensitive.
- Batch size: examples per update, which also drives memory use and throughput.
- Epochs: how many passes over the data, usually settled by early stopping.
- Depth and width: layers and units per layer, which set the model's capacity.
- Regularization strength: dropout probability and weight decay, trading fit against generalization.
- Optimizer: plain descent, momentum or Adam, each with its own sensible defaults.
Tune them roughly in that order. Sweeping everything at once wastes compute, because learning rate alone can swamp the effect of every other choice.
This answer doesn't lend itself to a diagram - it reads best . No credits were charged.
Why there's no diagram: “”
The interactive diagram is below the answer - jump to diagram ↓ · Below it, the related concept . Jump to it ↓
What is regularization in deep learning, and which techniques reduce overfitting?
What is dropout, and how does randomly switching off neurons help a network?
What is batch normalization, and how does it help a network train faster?
What is a convolutional neural network, and what problems is it good at?
What layers make up a typical CNN architecture, and what does each one do?
How does the convolution operation work, and what is a feature map?
What is pooling in a CNN, and how do max and average pooling differ?
What is a recurrent neural network, and how does it process a sequence?
What is tokenization, and why does text need it before a model sees it?
What is a word embedding, and what does closeness in that vector space mean?
Why must activation functions be non-linear, and what happens without them?
When would you choose sigmoid, tanh or ReLU as your activation function?
What is the difference between batch, mini-batch and stochastic gradient descent?
How do momentum, RMSprop and Adam improve on plain stochastic gradient descent?
How do you choose a batch size, and what else does that choice affect?
What are vanishing and exploding gradients, and why do deep networks suffer them?
How do you initialize a network's weights, and why not set them all to zero?
What is gradient clipping, and how else do you tame exploding gradients?
How does dropout differ from L1 and L2 regularization, and when do you use each?
What is the difference between batch normalization and layer normalization?
How does batch normalization behave differently at training time and at inference?
Training loss keeps falling while validation loss climbs - what do you do?
Your loss curve oscillates or spikes and will not settle - what do you change?
How do feedforward, convolutional and recurrent networks differ, and when do you pick each?
What does parameter sharing in a convolutional layer buy you over a fully connected one?
How do stride and padding change the output size of a convolutional layer?
Why do plain RNNs struggle with long sequences, and how do LSTMs help?
What are the gates in an LSTM cell, and what does each one control?
What is the difference between an LSTM and a GRU, and when do you pick one?
What is a Transformer, and how does it differ from a CNN or an RNN?
What is self-attention, and how does it differ from earlier attention mechanisms?
Why does a Transformer need positional encoding, and what does it add?
Why does a Transformer use multi-head attention instead of a single head?
What are the query, key and value vectors in self-attention?
How do the Transformer encoder and decoder differ, and why is future masking needed?
How are word2vec and GloVe embeddings produced, and where do they fall short?
What is byte pair encoding, and why do models tokenize into subwords?
What is transfer learning, and when does starting from a pretrained model pay off?
Why are attention scores scaled before the softmax, and what breaks without it?
Why do Transformer blocks use layer normalization instead of batch normalization?
Does gradient descent always converge to the optimum on a non-convex loss surface?
This answer is part of Pro.
The full written answer, with the trade-offs and follow-ups an interviewer will probe.
No matches
Try a different filter or search term.
Deep Learning & Neural Networks cheatsheet
- 30-second mental model01
- Pick the output head and loss02
- Choose an activation03
- Set the optimizer and learning rate04
- Choose batch size and fit it in memory05
- Regularize an overfitting model06
- Normalize activations07
- Initialize weights08
- Diagnose gradient problems09
- Size a convolutional layer10
- Handle sequences with RNNs11
- Work with Transformers and attention12
- + 4 more inside
- + 10 more inside
41 of 48 Deep Learning & Neural Networks answers are in Pro.
Full answers, code samples, and AI explanations that go simpler or deeper. Cancel anytime.
- Full answers + code
- AI explanations, simpler or deeper
- 1,000 AI credits / month
- Cancel anytime
Change topic
Pick a different technology or stack. Your current topic stays put until you choose a new one.
MEAN
MongoDB, Express, Angular, Node.jsMERN
MongoDB, Express, React, Node.jsDjango
Python Full-Stack DevelopmentRuby on Rails
Convention over ConfigurationServerless on AWS
Serverless Architecture on AWSInterviewers also test these - they're common to every stack, whichever one you picked above.
Flutter Mobile
Flutter Cross-Platform Mobile DevelopmentInterviewers also test these - they're common to every stack, whichever one you picked above.
Spring Boot
Enterprise Java Development.NET
Microsoft EcosystemVue
Vue.js, Vite, TypeScript, Tailwind, Node.jsGo Backend
Golang, gRPC, PostgreSQL, Redis, RabbitMQInterviewers also test these - they're common to every stack, whichever one you picked above.
FastAPI
Python, FastAPI, SQLAlchemy, PostgreSQLReact Native
React, TypeScript, Redux, FirebaseiOS Native
Swift, SwiftUI, UIKit, FirebaseAndroid Native
Java, Jetpack Compose, FirebaseDevOps / Platform
Docker, Kubernetes, Terraform, CI/CDInterviewers also test these - they're common to every stack, whichever one you picked above.
AI Engineer
LLMs, RAG, Agents, EvalsAI-Powered Developer
Claude Code, Copilot, Agentic WorkflowsCore SWE Interview Prep
Data structures, algorithms, OS, concurrency, networking, gitInterviewers also test these - they're common to every stack, whichever one you picked above.
Interviewers also test these - they're common to every stack, whichever one you picked above.