Notes on Section 4.2-4.3

bobown_yao

多层感知机MLP from scratch

我们沿用上面线性模型预测mnist数据集的框架,并在其上增加非线性层

Image: image_001

这里用一个相同形状的零张量a来实现ReLU函数

搭建和线性层相近整体实现如下:

Image: image_002

同样我们可以使用API快速实现这个模型

Image: image_003

  • Title: Notes on Section 4.2-4.3
  • Author: bobown_yao
  • Created at : 2025-12-24 00:00:00
  • Updated at : 2026-01-17 16:18:07
  • Link: https://bobownyao.github.io/2025/12/24/Notes-on-Section-4-2-4-3/
  • License: All Rights Reserved © bobown_yao
On this page
Notes on Section 4.2-4.3