Top AI Repos — open-source AI, indexed and scored
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Top AI Repos tracks AI repositories on GitHub and answers two different questions about each one: is it moving right now, and would you bet a product on it.
Building a simple neural network in Go
| Date | Stars |
|---|---|
| 2026-07-31 | 355 |
| 2026-08-03 | 355 |
| 2026-08-04 | 355 |
| 2026-08-06 | 355 |
Today
— stars today
This week
— stars this week
This month
— stars this month
Momentum
0.0
growth rate 0.00%/day
# How to build a simple artificial neural network I have written a lot of computer programs in my career, most of the time to solve various problems or perform some tasks (or sometimes just for fun). For most part, other than bugs, as long as I tell the computer what to do very clearly (in whichever the programming language I use) it will obediently follow my instructions. This is because computer programs are really good at executing algorithms -- instructions that follow defined steps and patterns that are precise and often repetitious. And in most cases they work well for us for tasks like number crunching or repetitious boring work.  What computer programs are not so good at doing though, are tasks that are not so well defined, and doesn’t follow precise patterns.  So how can we use computers to do such tasks? Just think about how _you_ do this task. You probably learned about birds when you're young, and you've been told certain animals are birds and certain animals are not, mostly through seeing them either in real life or through picture books. When you get it wrong, you'll be told and you remember that. Over time you have a _mental model_ of what's a bird and what's not. Every time you see something parts of a bird (clawed feet, feathered wings, sharp beak) you don't even need to see the whole animal anymore, you'll automatically identify it correctly by comparing it with your mental model. So how do we do this with computer programs? Basically we do the same thing. We try to create a _model_ that we can use to compare inputs with, through a trial and error process. And since computer programs are all mathematics, you can guess that it's going to be a _mathematical model_ that we're going to be talking about. # A guessing game Let's take a simple example create a black box that accepts an input and tries to predict the output.  We feed it with an input and get the output from this predictor. Since we know what the actual output should be, we can tell how different the predicted output is from the actual output. This difference between the actual and the predicted output becomes the _error_. Of course, if the predictor is static and can't be changed, it's all pretty much moot. When we feed our predictor with an input, an output is produced with an error and that's the end of the story. Not very useful. To make our predictor more useful let's give it a configurable parameter that we can use to influence the output. Since it only predicts correctly if there is no error, we want to change the parameter such that the error shrinks as we keep on feeding the predictor with data. The aim is to get a predictor that predicts the correct output most of the time, without actually needing to give clear instructions to the predictor. In other words, this is very much like a numbers guessing game. Let’s see this in a more practical way. Let’s say we have a predictor with the simple mathematical formula `o = i x c` where `o` is the output, `i` is the input and `c` is configurable parameter.  We are also given a confirmed valid output with a given input, that is, we know if `i` is 10, `o` is 26. How do we find `c` using the predictor? First, we need take a random prediction, let's say `c` is 2. Let's put in the input 10, and crank up the predictor. The output `o` is 20. Since the error `e = t - o` where `t` is the truth (or target), this means `e = 26 - 20 = 6`. Our error `e` is 6 and we want to achieve 0, so let's try again. Let's make `c` to be 3. The output is then `30` and is `e` is now `-4`. Oops, we overshot! Let's go back a bit and make `c` to be 2.5. That makes `o` to be 25, and `e` to be 1. Finally we try `c` to be 2.6 and we get the error `e` to be 0! Once we know what `c` is, we can use the predictor to predict the output for other inputs. Le
Excerpt of 39,550 characters
Read on GitHubWould you bet a product on this? Bounded 0–100 and slow moving.
matched fp:918b9c5556fe92fe, llm:description: "Building a simple neural network in Go"; language: Go
matched fp:918b9c5556fe92fe, llm:description: "Building a simple neural network in Go"; language: Go