ValueError: c of shape (1, 300) not acceptable as a color sequence for x with size 300, y with size

817 ワード

呉恩達は深く第2節WEEK 1のプログラミングの練習を学んで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))