You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue when trying to plot "Decision Boundary for hidden layer size 3". Below the error:
ValueError Traceback (most recent call last)
in ()
1 # Plot hasil
----> 2 plot_decision_boundary(lambda x: predict(model, x))
3 plt.title("Decision Boundary for hidden layer size 3")
in plot_decision_boundary(pred_func)
28 # Predict the function value for the whole gid
29 Z = pred_func(np.c_[xx.ravel(), yy.ravel()])
---> 30 Z = Z.reshape(xx.shape)
31 # Plot the contour and training examples
32 plt.contourf(xx, yy, Z, cmap=plt.cm.Spectral)
ValueError: cannot reshape array of size 200 into shape (328,461)
Is there any solution for this? Thank you
The text was updated successfully, but these errors were encountered:
@sukasenyumm just check your predict function. You must have used the 'X' which was globally declared input rather than the x parameter of your predict function.
thanks for your great tutorial!
I have an issue when trying to plot "Decision Boundary for hidden layer size 3". Below the error:
ValueError Traceback (most recent call last)
in ()
1 # Plot hasil
----> 2 plot_decision_boundary(lambda x: predict(model, x))
3 plt.title("Decision Boundary for hidden layer size 3")
in plot_decision_boundary(pred_func)
28 # Predict the function value for the whole gid
29 Z = pred_func(np.c_[xx.ravel(), yy.ravel()])
---> 30 Z = Z.reshape(xx.shape)
31 # Plot the contour and training examples
32 plt.contourf(xx, yy, Z, cmap=plt.cm.Spectral)
ValueError: cannot reshape array of size 200 into shape (328,461)
Is there any solution for this? Thank you
The text was updated successfully, but these errors were encountered: