Planar+data+classification+with+one+hidden+layer+v5
报一个错误:
ValueError: c of shape (1, 400) not acceptable as a color sequence for x with size 400, y with size 400

找到调用函数的地方,将 c=y改成:
两种解决均可:
1. c=Y.reshape(400)
2. c= np.squeeze(y)

注意:如果你是用的jupyter notebook做的,在练习的页面一定记得点一下kernel下面的那个刷新图标,也就是重启内核,还记得把上面的导包命令重新执行一下,不然还是会报这个错误。
193

被折叠的 条评论
为什么被折叠?



