Closed OmarAlmighty closed 2 years ago
Hm that's weird. I must admit that I've never seen a loss or accuracy plot that looks like a step-wise function. Did you maybe call plt.step
instead of plt.plot
?
Hi Sebastian, I did several experiments and concluded that there was a problem with the IDE, VS code. I restarted the IDE and my machine, then the code worked as supposed to be.
Thank you so much for your consideration!
In the Solving an XOR classification problem section, the author defined the model, then defined the loss function and the optimizer, then created the data loader. Finally, he defined the training function followed by plotting the results. If I follow this same sequence, I get this figure This figure is different from what is shown in the book!
However, in the notebook, the author defined the data loader, then the model, then the loss function and the optimizer, followed by the training and plotting procedures. That it, he defined the data loader first instead of being before the training procedure.
Can anyone please explain why changing the order of the cells causes such error?