[W4, Programming Assignment: Deep Neural Network - Application]ValueError: too many values to unpack (expected 2)

ValueError Traceback (most recent call last)

in -

—> 1parameters, costs = L_layer_model(train_x, train_y, layers_dims, num_iterations =1, print_cost =False)

2

3 print("Cost after first iteration: "+ str(costs[0]))

4

5 L_layer_model_test(L_layer_model)

ValueError: too many values to unpack (expected 2)

I suggest you study this post to get clues on how to proceed:

1 Like

Thanks, that is sorted, another error arises which is IndexError: list index out of range. this occurs if i access invalid indices in my Python lis . For example, if you try to access the list element with index 10 but your lists consist only of three elements, Python will throw an IndexError telling you that the list index is out of range. but i can’t see it in this instance of the image attached


You can try printing the costs array inside two layer model to see that you actually append to it

It’s not printing the cost array

Send me your notebook as a private message and I will have a look

sent as requested to your private message inbox. thank you

you have a problem with indentation. python requires correct indentation. check all your code and if you can’t find the problem, reset your workbook and enter your solution again.

you also have changed in cells where you are not allowed to change. only enter solution where you are asked to, and don’t touch or change anything else.

i updated the notebook and i aw the code indentation was properly set.


Thanks, it worked but i will refresh the page so i can see the submit button. Thanks so much Teacher jonaslalin. when i become a ML devops Teacher in the future i will mention your name as my Superior trainer.

1 Like

Besides this i would like to design a neural network in the future called “Sojinet” please how will i do this? please at your leisure time, please can you have an online meeting for me at WAT time? Thanks

I am glad it worked out for you. My recommendation is to get more experience in python, numpy and Tensorflow or PyTorch before you start with an end to end spare time project. You can of course start right now but you will probably have an easier time if you learn to walk before you run. If you want feedback for a project idea, create a new post and describe your idea and what questions you might have. Mentors and other students may have valuable feedback. Best of luck with the rest of the course.

Good morning sir, I applied for MLops scholarship at fourtbrain AI and I am required to deposit $500 . Please sir can you suggest how I can get such amount. Attached is the mail I received from fourth AI.

Congratulations! I have no idea.