Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error in merge all function into model #6

Open
miniamisha opened this issue Nov 20, 2018 · 2 comments
Open

Error in merge all function into model #6

miniamisha opened this issue Nov 20, 2018 · 2 comments

Comments

@miniamisha
Copy link

Cost after iteration 0: 0.693147
Cost after iteration 100: 0.584508
Cost after iteration 200: 0.466949
Cost after iteration 300: 0.376007
Cost after iteration 400: 0.331463
Cost after iteration 500: 0.303273
Cost after iteration 600: 0.279880
Cost after iteration 700: 0.260042
Cost after iteration 800: 0.242941
Cost after iteration 900: 0.228004
Cost after iteration 1000: 0.214820
Cost after iteration 1100: 0.203078
Cost after iteration 1200: 0.192544
Cost after iteration 1300: 0.183033
Cost after iteration 1400: 0.174399
Cost after iteration 1500: 0.166521
Cost after iteration 1600: 0.159305
Cost after iteration 1700: 0.152667
Cost after iteration 1800: 0.146542
Cost after iteration 1900: 0.140872

ValueError Traceback (most recent call last)
in ()
----> 1 d = model(train_set_x, train_set_y, test_set_x, test_set_y, num_iterations = 2000, learning_rate = 0.005, print_cost = True)

in model(X_train, Y_train, X_test, Y_test, num_iterations, learning_rate, print_cost)
31
32 # Predict test/train set examples (≈ 2 lines of code)
---> 33 Y_prediction_test = predict(w,b,test_set_x)
34 Y_prediction_train = predict(w,b,train_set_x)
35

in predict(w, b, X)
16 m = X.shape[1]
17 Y_prediction = np.zeros((1,m))
---> 18 w = w.reshape(X.shape[0], 1)
19
20 # Compute vector "A" predicting the probabilities of a cat being present in the picture

ValueError: total size of new array must be unchanged

@JChungYS
Copy link

I am having the same problem.

@sugampath
Copy link

how to solve ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants