Syllabus Lesson 50 of 246 · Module 3: Neuron to MLP
Module 3: Neuron to MLP

Gate: a network for a new dataset (AI off)

Why it matters The AI-off twin: the same skills, on data you have not seen, without help. Passing it means the ideas are yours. Already know this module? You can take this gate first, before the other lessons: passing it marks this module done and opens the next one.

AI tutor off. The data is "two moons": two interleaving crescent shapes that no straight line can separate. Write a two-layer network from scratch (forward, backward, training loop) and classify them.

Words and symbols in this lesson
learning rate (lr)
how big each training step is
Your turn

Write train(X, y, seed) returning your parameters and predict(params, X) returning 0 or 1 per row. Any hidden size, activation and learning rate you like. Reach at least 95% on 500 hidden moon points. The check also trains your network again on new moons with another seed, so it has to work every time, not once.

AI off: no tutor, hints or worked solution on this one. Your own thinking only.

Spotted a problem in this lesson? Report it · Ask about this lesson

Code · runs in your browser
Output

        

Your progress is counted anonymously. Change this