Skip to content

Commit d4adfc2

Browse files
committed
fix(notation): add spaces around $\times$ in conv lst-cap
Pre-push hook 'Book: check math (\times spacing)' flagged the 'Logical Convolution Computation' lst-cap (vol1/nn_architectures L1793) for missing spaces around $\times$. The lst-cap was reverted to bare-prose form earlier (commit d551574) because the canonical math-mode form $O(\text{batch} \times \text{output\_channels} \times ...)$ broke LaTeX inside lst-cap=. Bare-prose form needs explicit spacing. Was: O(batch$\times$height$\times$width$\times$output_channels$\times$...) Now: O(batch $\times$ height $\times$ width $\times$ output_channels $\times$ ...)
1 parent 5e8abed commit d4adfc2

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

book/quarto/contents/vol1/nn_architectures/nn_architectures.qmd

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1646,13 +1646,13 @@ The preceding architectural properties make CNNs highly amenable to systems-leve
16461646

16471647
::: {tbl-colwidths="[17,30,53]"}
16481648

1649-
| **Property** | **Value** | **System Implication** |
1650-
|:----------------|:---------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------|
1651-
| **Parameters** | `{python} LighthouseSpecs.resnet_params_m_str` million | `{python} LighthouseSpecs.resnet_fp32_mb_str` MB model size at FP32; fits comfortably in GPU memory. |
1652-
| **FLOPs/Image** | `{python} LighthouseSpecs.resnet_gflops_str` GFLOPs $(224{\times}224)$ | Dominated by $3{\times}3$ convolutions (~90 percent of compute). |
1653-
| **Constraint** | Compute Bound | Limited by raw FLOPs, not memory bandwidth. |
1654-
| **Bottleneck** | FP Throughput | Benefits maximally from specialized Matrix Units (Tensor Cores). |
1655-
| **Profile** | High Arithmetic Intensity | High ratio of math-to-memory operations (~100 FLOPs/byte). |
1649+
| **Property** | **Value** | **System Implication** |
1650+
|:----------------|:-----------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------|
1651+
| **Parameters** | `{python} LighthouseSpecs.resnet_params_m_str` million | `{python} LighthouseSpecs.resnet_fp32_mb_str` MB model size at FP32; fits comfortably in GPU memory. |
1652+
| **FLOPs/Image** | `{python} LighthouseSpecs.resnet_gflops_str` GFLOPs $(224{\times}224)$ | Dominated by $3{\times}3$ convolutions (~90 percent of compute). |
1653+
| **Constraint** | Compute Bound | Limited by raw FLOPs, not memory bandwidth. |
1654+
| **Bottleneck** | FP Throughput | Benefits maximally from specialized Matrix Units (Tensor Cores). |
1655+
| **Profile** | High Arithmetic Intensity | High ratio of math-to-memory operations (~100 FLOPs/byte). |
16561656

16571657
:::
16581658
:::
@@ -1790,7 +1790,7 @@ The bridge between the logical model and physical execution becomes critical for
17901790

17911791
@lst-conv_layer_compute reveals the logical computational pattern: seven nested loops that process each spatial position. While functionally correct, this naive implementation is rarely used in practice due to poor memory locality. Instead, the **im2col** approach trades memory (duplicating overlapping input pixels) for computational regularity, converting the messy nested loops into a streamlined matrix multiplication that saturates hardware FP units.
17921792

1793-
::: {#lst-conv_layer_compute lst-cap="**Logical Convolution Computation**: Seven nested loops expose O(batch$\times$height$\times$width$\times$output_channels$\times$kernel_h$\times$kernel_w$\times$input_channels) complexity. While logically sound, this pattern is inefficient on hardware; production systems transform this into tiled matrix multiplications."}
1793+
::: {#lst-conv_layer_compute lst-cap="**Logical Convolution Computation**: Seven nested loops expose O(batch $\times$ height $\times$ width $\times$ output_channels $\times$ kernel_h $\times$ kernel_w $\times$ input_channels) complexity. While logically sound, this pattern is inefficient on hardware; production systems transform this into tiled matrix multiplications."}
17941794

17951795
```{.python}
17961796
def conv_layer_compute(input, kernel, bias):

0 commit comments

Comments
 (0)