Skip to content

Instantly share code, notes, and snippets.

View anhdanggit's full-sized avatar

Anh Dang anhdanggit

View GitHub Profile
@thomasnield
thomasnield / sympy_neural_network_derivatives.py
Last active November 11, 2021 14:10
sympy_neural_network_derivatives.py
from sympy import *
# Declare weight, bias, layer outputs, and input variables
# W1 and W2 are hidden and output layer weights
# B1 and B2 are hidden and output layer biases
# A1 and A2 are activated layer outputs
# Z1 and Z2 are inactivated layer outputs
# X and Y are the training data
W1, W2, B1, B2, A1, A2, Z1, Z2, X, Y = \