data-science-from-scratch
data-science-from-scratch copied to clipboard
Deep Learning XOR Revisited Example
I have looked over the code in the repository and still have not found a difference in my code that would cause it to break. I have reworked the entire chapter up to this point and still can not figure it out. Below is the error message and my code in its entirety is attached.
In [121]: with tqdm.trange(3000) as t: ...: for epoch in t: ...: epoch_loss = 0.0 ...: for x, y in zip(xs, ys): ...: predicted = net.forward(x) ...: epoch_loss += loss.loss(predicted, y) ...: gradient = loss.gradient(predicted, y) ...: net.backward(gradient) ...: optimizer.step(net) ...: t.set_description(f"xor loss {epoch_loss:.3f}") ...: 0%| | 0/3000 [00:00<?, ?it/s]
NotImplementedError Traceback (most recent call last)
NotImplementedError: dsfs_deeplearningissue.txt
I see where i defined some of the Linear class methods out side of the class block. I went back and correct that and still receive the same error