Search⌘ K
AI Features

Exercise: Create and Train an MLP

Explore how to design and train a multilayer perceptron neural network with four layers on a tabular dataset. Learn to split data, create data loaders, define loss and optimization steps, and monitor training and validation performance through practical coding exercises.

Problem statement

Now is the time to design a multilayer perceptron and train it on a tabular dataset.

The dataset contains 6000 observations. Each observation has six numerical features (v0v5) and belongs to one of three classes (0, 1, 2).

Observations Features and Class

v0

v1

v2

v3

v4

v5

class

1.218

0.345

0.855

0.309

0.428

0.299

2

0.648

0.893

0.777

1.282

-2.196

1.031

2

0.187

1.812

1.792

-0.811

0.116

-0.336

2

...

...

...

...

...

...

...

Launch the Jupyter Notebook app below and follow the instructions.

Instructions:

  • The comment lines starting with # >>> indicate that you must edit the cell.

  • Replace the None values with the correct function ...