Skip to content

Instantly share code, notes, and snippets.

View yanCode's full-sized avatar
🏠
Working from home

Zhang ShengYan yanCode

🏠
Working from home
  • Suzhou, JiangSu, China
View GitHub Profile
@yanCode
yanCode / neural-network-from-scratch.py
Created October 20, 2022 00:36 — 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)