L1aoXingyu/code-of-learn-deep-learning-with-pytorch

fix one plot problem in nn-sequential-model

rexjoe opened this issue · 1 comments

under MacOS X 10.13, conda, python 3.6 Matplotlib 2.1.2

  1. in plot_decision_boundary:
    change "plt.scatter(x[:, 0], x[:, 1], c=y, cmap=plt.cm.Spectral)" to
    "plt.scatter(x[:, 0], x[:, 1], c=y.reshape(-1), cmap=plt.cm.Spectral)"
  2. change "plt.scatter(x[:, 0], x[:, 1], c=y, s=40, cmap=plt.cm.Spectral)" to
    "plt.scatter(x[:, 0], x[:, 1], c=y.reshape(-1), s=40, cmap=plt.cm.Spectral)"

fixed