Files
Yeqi Huang 9c0439f424 fix(v1-en): repair missing figures and section pages in English edition (#506)
- Remap 129 broken image paths in v1/en_chapters to the files that exist
  under v1/img (old chapter numbering, renamed files, and .pdf figures
  that browsers cannot display inline).
- Restore ch07/7.5/distribute.png and ch08/distillation.png, which were
  dropped in #499 because the `dist*` .gitignore rule matched them;
  narrow the rule to `/dist/`.
- Fix the English toc blocks: chapter entries now point at real files and
  the root toc has part headings, so section pages are built again
  (previously only chapter index pages were generated).
- Add tests/test_image_references.py to CI to catch missing or
  unrenderable figure references.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-26 01:57:57 +00:00

2.0 KiB

Programming Model

Machine learning frameworks comprise various components that facilitate the efficient development of algorithms, data processing, model deployment, performance optimization, and hardware acceleration. When designing the application programming interfaces (APIs) for these components, a key consideration is striking the right balance between framework performance and usability. To achieve optimal performance, developers utilize C or C++, as these programming languages enable efficient invocation of the APIs provided by the operating system and hardware accelerators.

Regarding usability, machine learning framework users, including data scientists, biologists, chemists, and physicists, often possess strong industrial backgrounds and are skilled in using high-level scripting languages like Python, Matlab, R, and Julia. While these languages offer remarkable programming usability, they lack deep optimization capabilities for underlying hardware or operating systems compared to C and C++. Therefore, the core design objective of machine learning frameworks encompasses two aspects: providing easy-to-use APIs for implementing algorithms using high-level languages like Python, and providing low-level APIs centered around C and C++ to assist framework developers in implementing numerous high-performance components and efficiently executing them on hardware. This chapter describes strategies for achieving this design objective.

The chapter aims to achieve the following learning objectives:

  1. Understanding the workflows and programming principles of machine learning frameworks.

  2. Understanding the design of neural network models and layers.

  3. Understanding how machine learning frameworks bridge Python and C/C++ functions.

  4. Understanding the support for functional programming in machine learning frameworks.

:maxdepth: 2

development_history
ml_workflow
neural_network_layer
c_python_interaction
ml_programming_paradigm
summary