miraclelucy / dive_into_deep_learning Goto Github PK
View Code? Open in Web Editor NEW✔️李沐 【动手学深度学习】课程学习笔记:使用pycharm编程,基于pytorch框架实现。
✔️李沐 【动手学深度学习】课程学习笔记:使用pycharm编程,基于pytorch框架实现。
为什么optimizer在每个batch之后不需要把梯度清零,并且可以得到正确结果
我写了个类似的代码,但是不加optimizer.zero_gard()会导致正确率越训越低直到10%
你好,我想在pycharm中使用d2l包(pytorch版)进行开发,但是由于目前直接pip下来的是适用于jupyter的,有一些魔术命令无法运行,有什么解决办法吗?十分感谢,例如:d2l/torch中有from matplotlib_inline import backend_inline这个命令,想请教下是如何处理的
No module named 'common'
尝试更改了 Animator
累加器的 add
方法实现使用 Matplotlib
输出图表
代码如下
def add(self, x, y):
# Add multiple data points into the figure
if not hasattr(y, "__len__"):
y = [y]
n = len(y)
if not hasattr(x, "__len__"):
x = [x] * n
if not self.X:
self.X = [[] for _ in range(n)]
if not self.Y:
self.Y = [[] for _ in range(n)]
for i, (a, b) in enumerate(zip(x, y)):
if a is not None and b is not None:
self.X[i].append(a)
self.Y[i].append(b)
self.axes[0].cla()
for x, y, fmt in zip(self.X, self.Y, self.fmts):
self.axes[0].plot(x, y, fmt)
self.config_axes()
d2l.plt.pause(0.01)
主要添加了 d2l.plt.pause(0.01)
来显示图片,我在权重衰减从零实现中测试正常
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.