Skip to content
Snippets Groups Projects
Commit 9b0df479 authored by Elkhadri Doha's avatar Elkhadri Doha
Browse files

Upload New File

parent efbadabd
No related branches found
No related tags found
No related merge requests found
from mlp import learn_once_mse
import numpy as np
def learn_once_mse_test():
N = 100
d_in = 30
d_out = 1
d_h = 5
train = np.random.rand(N, d_in)
targets = np.random.randint(10, size=(N, d_out))
w1 = 2 * np.random.rand(d_in, d_h) - 1
b1 = np.zeros((1, d_h))
w2 = 2 * np.random.rand(d_h, d_out) - 1
b2 = np.zeros((1, d_out))
w1, b1, w2, b2, loss = learn_once_mse(w1, b1, w2, b2, train, targets, learning_rate=0.01)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment