😋Deep learning Guide 1: Layers and Modules
00 min
2024-6-20
2024-6-27
type
status
date
slug
password
summary
tags
category
icon

Build a basic MLPs

Build a basic Sequential Module

We can now take a closer look at how the Sequential class works. Recall that Sequential was designed to daisy-chain other modules together. To build our own simplified MySequential, we just need to define two key methods:
  1. A method for appending modules one by one to a list.
  1. A forward propagation method for passing an input through the chain of modules, in the same order as they were appended.

How to use Sequential module?

Executing Code in the Forward Propagation Method

combine:

Parameter Management

Parameter Access

Targeted Parameters

All Parameters at Once

Use the NestMLP model defined in sec_model_construction and access the parameters of the various layers.

上一篇
Deep learning Guide 2: LeNet model
下一篇
Tools for Deep Learning 1: speeding up your workflow

Comments
Loading...