Neuron 101

A neural network from scratch / Draw it yourself

Türkçe

Plate54

Unit 5 · Topic 12 of 12

Draw it yourself

Easy, 6 min, 7 steps

your drawing
Keyboard: left and right arrows change the step, space plays and pauses.

Step 1 of 7 Draw

Your canvas

This is your canvas: with the Draw pen tap cells or drag across them, with the Erase pen erase them. Right now 16 cells are filled. For an empty canvas set the ready-made drawing to 2.

Open in Colab
  1. dolu = [(r, c) for r in range(12)
  2. for c in range(12) if g[r][c]]
  3. r0 = min(r for r, c in dolu)
  4. c0 = min(c for r, c in dolu)
  5. h = max(r for r, c in dolu) - r0 + 1
  6. w = max(c for r, c in dolu) - c0 + 1
  7. m = max(h, w)
  8. nh = max(1, (20 * h + m) // (2 * m))
  9. nw = max(1, (20 * w + m) // (2 * m))
  10. # her hedef hücre kaynak bloğunun
  11. # herhangi bir hücresi doluysa dolar
  12. x = ortala(g)
  13. p = ag(x)
  14. print(p.index(max(p)), max(p))
tahmin
2
guven
100
dolu
16