Closed yannklein closed 4 years ago
While running plt.scatter(x[:,0],x@a)
plt.scatter(x[:,0],x@a)
I had the following issue: RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead.
RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead.
After some googling, I found this solution.
Thus, I propose the following fix to smoothen the Lesson SGD :) Fix: plt.scatter(x[:,0],x@a.detach())
plt.scatter(x[:,0],x@a.detach())
Check out this pull request on
Review Jupyter notebook visual diffs & provide feedback on notebooks.
Powered by ReviewNB
While running
plt.scatter(x[:,0],x@a)
I had the following issue:
RuntimeError: Can't call numpy() on Variable that requires grad. Use var.detach().numpy() instead.
After some googling, I found this solution.
Thus, I propose the following fix to smoothen the Lesson SGD :) Fix:
plt.scatter(x[:,0],x@a.detach())