<commit_before>---
title: "Neural Networks from Scratch"
layout: post
date: 2017-11-03 19:53
image: '/assets/images/'
description:
tag:
blog: true
jemoji:
author:
---

In this post we'll take a dive into the maths behind neural networks and how they work by building our own neural network from scratch using Python.

## WTF is a neural net?

Our brains are full of billions and billions of neurons stacked together. They look a little something like this...

![A simple artificial neuron](/assets/images/neural_networks_from_scratch/neuron.png)

At their core, they're just a cell that takes in some very basic electric signals, and decides wether to fire a signal to the next neuron or not based on the signals it receives. A single neuron on it's own isn't very useful, but when we start stacking lots of neurons together, and let each of them handle a tiny bit of information in the form of an electrical impulse, we get a brain, and it turns out brains are actually pretty good at complex stuff.

In the 50s a bunch of researchers decided to take inspiration from the way the brain works and create an artificial neuron (this is what is in the diagram) that would take in a set of numbers, perform some kind of function (like adding them together for example) and then pass the result to the next neuron. We could even stack lots of neurons together to make a neural network just like the brain! This was a great idea, but in the 50's, we didn't have the computing power or the amount of data needed to make it work.<commit_msg>Backdated post<commit_after>---
title: "Neural Networks from Scratch"
layout: post
date: 2017-11-02 19:53
image: '/assets/images/'
description:
tag:
blog: true
jemoji:
author:
---

In this post we'll take a dive into the maths behind neural networks and how they work by building our own neural network from scratch using Python.

## WTF is a neural net?

Our brains are full of billions and billions of neurons stacked together. They look a little something like this...

![A simple artificial neuron](/assets/images/neural_networks_from_scratch/neuron.png)

At their core, they're just a cell that takes in some very basic electric signals, and decides wether to fire a signal to the next neuron or not based on the signals it receives. A single neuron on it's own isn't very useful, but when we start stacking lots of neurons together, and let each of them handle a tiny bit of information in the form of an electrical impulse, we get a brain, and it turns out brains are actually pretty good at complex stuff.

In the 50s a bunch of researchers decided to take inspiration from the way the brain works and create an artificial neuron (this is what is in the diagram) that would take in a set of numbers, perform some kind of function (like adding them together for example) and then pass the result to the next neuron. We could even stack lots of neurons together to make a neural network just like the brain! This was a great idea, but in the 50's, we didn't have the computing power or the amount of data needed to make it work.
{'fraction_non_alphanumeric': 0.04564721225953701, 'fraction_numerical': 0.010433648516465601, 'mean_word_length': 4.2534246575342465, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5444316', 'n_tokens_mistral': 810, 'n_tokens_neox': 745, 'n_words': 518}