Not the plot as in the video for losses

Hi,

I am not able to get the plot of losses to decrease like that in the video even after changing the epochs and the learning_rate of the same. Could you please tell why this error is occurring.

The plot changes on the change in the values of the epochs and learning_rate.

Here is the link to the code. Also, I am not able to get the module from which Prateek Bhaiya plotted the decision surface. Neither is it available on the git repository of the course. Also, the notebook file of the above code is also not there on the git repository of the same. Please upload the require files and provide the link for the same.

hey @A18ML0031 ,
i just played a bit with learning rate , nuber of epochs and your layer sizes and it worked absolutely fine.
Kindly have a look at it again.

else you can check https://github.com/prateek27/deep-neural-network , this code link to neural network code used by prateek bhaiya.
I hope this helps you.

Here is the code: https://ide.codingblocks.com/s/330635 Also, if you could check why I can’t post the drive link to the jupyter file of the same. I have posted them before but, since a few days it says ‘not able to upload that link to host’ something of that sort. Could you please check and help me out with the same.

Ignore my reply. I was posting it to another doubt.

What is the values of the same with which it is working fine, because I have tried the same and got different results.

just take a bit lower learning rate.
i used layers to be [5,4] with 200 epochs and 0.001 learning rate and it worked absolutely fine

Okay, I have got a correct plot for the losses. However, the later part where we plot the different data sets ‘xor’, ‘moons’, etc. I am not able to understand why i am getting an error. I have written the exact same code as Prateek Bhaiya. Here is the error: TypeError Traceback (most recent call last) in 4 for d in datasets: 5 model = NeuralNetwork(input_size=2, layers=[4, 3], output_size=2) ----> 6 X, Y = load_dataset(d) 7 8 train(X, Y, model, epochs=1000, learning_rate=0.001, logs=False) TypeError: ‘NoneType’ object is not iterable

My reply got flagged here as well. What is this happening?

it means that you are using a variable to iterate over the data but actually that variable is None.
so just check that once. debug it.

i dont have any clue about this. Sorry.

Here is the drive link to the code: https://drive .google .com/file/d/1Bb9JJp1j-47QCQbmUDKBKxj-ksF07avX/view?usp=sharing . I am iterating over the list of datasets. I am able to print them out but not able to create the dataset

hey @A18ML0031 ,
just add return statement in your laod_dataset function.
it will work

Okay, it is working now. However, since i haven’t been able to import the visualize module, it is showing an error because of that. I have already raised an error related to the same beforehand

So the concerned TA might be interacting with you about the same in that doubt.
If still you haven’t got it corrected , share me its link so that i can have a look at it.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.