吴恩达深度学习第二节WEEK1 编程练习在jupyter notebook上运行到
plt.title("Model with Zeros initialization")
axes = plt.gca()
axes.set_xlim([-1.5,1.5])
axes.set_ylim([-1.5,1.5])
plot_decision_boundary(lambda x: predict_dec(parameters, x.T), train_X, train_Y)
报错 :
ValueError: c of shape (1, 300) not acceptable as a color sequence for x with size 300, y with size 300
解决办法,将上述代码的最后一行改为:
plot_decision_boundary(lambda x: predict_dec(parameters, x.T), train_X, np.squeeze(train_Y))