在如题的optional lab中,有如下代码计算决策边界,但是按照w0x0+w1x1+b=0求解x0和x1的话,w_out的索引不是应该与x的下标对应吗?
fig,ax = plt.subplots(1,1,figsize=(5,4))
# plot the probability
plt_prob(ax, w_out, b_out)
# Plot the original data
ax.set_ylabel(r'$x_1$')
ax.set_xlabel(r'$x_0$')
ax.axis([0, 4, 0, 3.5])
plot_data(X_train,y_train,ax)
# Plot the decision boundary
x0 = -b_out/w_out[1] #为什么不是w_out[0]
x1 = -b_out/w_out[0] #为什么不是w_out[1]
ax.plot([0,x0],[x1,0], c=dlc["dlblue"], lw=1)
plt.show()