News for hackers. Stuff that matters.
Re:Show HN: Can an AI model fit on a single pixel? by deevelton on Tuesday April 07, 2026 @11:00PM (#47684478)
This was just a fun thought experiment.

Feed it two inputs (e.g. chance of rain and wind speed; this is one of the examples in the demo) and it learns to answer a yes/no question like "bring an umbrella?" It's a one-neuron binary classifier with three learned parameters: two weights and a bias. Those three numbers map directly to Red, Green, and Blue. Save the model: you get a 1x1 PNG. Load the pixel: you get your classifier back. The color is the model.

Re:Show HN: Can an AI model fit on a single pixel? by mememememememo on Wednesday April 08, 2026 @02:22AM (#47686101)
It is fun. The trainer seems to get stuck in local minima though.
Re:Show HN: Can an AI model fit on a single pixel? by deevelton on Wednesday April 08, 2026 @02:41AM (#47686224)
Re:Show HN: Can an AI model fit on a single pixel? by mememememememo on Wednesday April 08, 2026 @03:42AM (#47686737)
Tried again and no. To reproduce create a corridor e.g.

    X    O
    
     X     O

      X   O
       X     O

       X   O
Line can get jammed in non vertical positon.
Re:Show HN: Can an AI model fit on a single pixel? by deevelton on Wednesday April 08, 2026 @08:52AM (#47689513)
Increased default epochs to 2000 instead of 500, I think that fixed it but let me know if you still run into this.
Re:Show HN: Can an AI model fit on a single pixel? by mememememememo on Thursday April 09, 2026 @03:47AM (#47700500)
Works for me now, thanks!
Re:Show HN: Can an AI model fit on a single pixel? by deevelton on Thursday April 09, 2026 @10:49AM (#47704514)
awesome! thanks for checking it out