How does a DenseNet block differ from a ResNet block in how earlier features are combined, what is the channel count entering layer l (with initial channels k0 and growth rate k), and what is the trade-off between parameter efficiency and GPU memory?

Deep learning, Classic architectures
Level L3 Intermediate. Length Short. Nature Th+Mat Both.

What's being asked

Whether you understand feature concatenation versus addition and its practical memory cost.

Key idea

ResNet adds the residual to the previous tensor (xl=xl−1+Fl(xl−1)), keeping channel width fixed; DenseNet concatenates all preceding feature maps (xl=Hl([x0,x1,…,xl−1])), growing width linearly as k0+(l−1)k so each layer only needs to emit k new channels.

Steps

  1. Write both updates: ResNet sums (xl=xl−1+Fl(xl−1)), whereas DenseNet concatenates along channels, passing [x0,x1,…,xl−1] as input to composite function Hl (typically BN–ReLU–1×1–BN–ReLU–3×3).
  2. Derive the channel count: if the block starts with k0 channels and each of the l−1 earlier layers adds k channels (the growth rate, often k=12 or 32), layer l receives k0+(l−1)k input channels.
  3. Explain parameter efficiency: because raw features from early layers remain directly accessible without re-learning them, DenseNet achieves high accuracy with narrow layers (small k) and far fewer parameters than wide ResNets.
  4. State the memory trade-off: naive implementations allocate new memory for every concatenated tensor at each layer, giving O(L2) activation memory in block depth L unless shared-memory checkpoints recompute concatenations during the backward pass. Transition layers (1×1 conv + average pooling) also compress channels between dense blocks.

Common mistakes

How long your answer should be

4–5 sentences; about 2 minutes.

Read this

Previous in Deep learning: A ResNet bottleneck block maps 256 channels to 256 channels via a 1×1 conv (to 64), a 3×3 conv (at 64) and a 1×1 conv (to 256), ignoring biases. How many parameters and MACs per spatial position does it use compared with a basic block of two 3×3 convs at 256 channels, and how does the same 1×1 idea cut the cost of a 5×5 Inception branch (192→32 channels via 16 bottleneck channels)?
Next in Deep learning: In a VAE with prior p(z)=N(0,I) and diagonal Gaussian encoder qϕ(z∣x)=N(μ,diag⁡(σ12,…,σd2)), how do you derive the closed-form KL divergence DKL(qϕ(z∣x) ∥ p(z)), and what does each term encourage?