Skip to content

Instantly share code, notes, and snippets.

View nsadawi's full-sized avatar

Noureddin Sadawi nsadawi

View GitHub Profile
@nsadawi
nsadawi / neural-network-from-scratch.py
Created December 7, 2022 18:46 — forked from svpino/neural-network-from-scratch.py
An implementation of a neural network from scratch
import numpy as np
def sigmoid(x):
return 1 / (1 + np.exp(-x))
def neural_network(X, y):
learning_rate = 0.1
W1 = np.random.rand(2, 4)
W2 = np.random.rand(4, 1)