Skip to content

ValueError: cannot reshape array of size 200 into shape (328,461) #18

@sukasenyumm

Description

@sukasenyumm

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions