kZjPBD.jpg
摘要: 阅读全文
posted @ 2022-05-17 20:07 Through_The_Night 阅读(2) 评论(0) 推荐(0) 编辑
摘要: ax.set_xticks(range(ll)) #设置哪些成为坐标ax.set_yticks(range(ll))ax.set_xticklabels(sentence,rotation = 30) # 设置坐标的labelax.set_yticklabels(sentence)ax.grid(T 阅读全文
posted @ 2022-05-14 19:05 Through_The_Night 阅读(7) 评论(0) 推荐(0) 编辑
摘要: https://zhuanlan.zhihu.com/p/426906301 self[index[i][j][k]][j][k] = src[i][j][k] # if dim == 0 self[i][index[i][j][k]][k] = src[i][j][k] # if dim == 1 阅读全文
posted @ 2022-04-22 20:06 Through_The_Night 阅读(7) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-16 20:22 Through_The_Night 阅读(4) 评论(0) 推荐(0) 编辑
摘要: https://www.hacther.cn/122.html 阅读全文
posted @ 2022-04-07 16:42 Through_The_Night 阅读(2) 评论(0) 推荐(0) 编辑
摘要: x = torch.tensor(2.0)x.requires_grad_(True)y = 2 * xz = 5 * x w = y + z.detach()w.backward() print(x.grad) => 2 本来应该x的梯度为7,但是detach()那一路切段了梯度的传播,导致5没有 阅读全文
posted @ 2022-04-03 21:16 Through_The_Night 阅读(7) 评论(0) 推荐(0) 编辑
摘要: def step(self): "Update parameters and rate" self._step += 1 rate = self.rate() for p in self.optimizer.param_groups: p['lr'] = rate self._rate = rate 阅读全文
posted @ 2022-04-03 16:13 Through_The_Night 阅读(6) 评论(0) 推荐(0) 编辑
摘要: 01-.tar格式 解包:[*******]$ tar xvf FileName.tar 打包:[*******]$ tar cvf FileName.tar DirName(注:tar是打包,不是压缩!) 02-.gz格式 解压1:[*******]$ gunzip FileName.gz 解压2 阅读全文
posted @ 2022-03-16 22:34 Through_The_Night 阅读(41) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-03-06 10:14 Through_The_Night 阅读(18) 评论(0) 推荐(0) 编辑
摘要: import numpy as npfrom matplotlib import pyplot as plt t=np.arange(0.0,2.0,0.1)s=np.sin(t*np.pi)figure,ax=plt.subplots(1,1) ax.plot(t,s,'r*')ax.plot(t 阅读全文
posted @ 2022-03-04 15:21 Through_The_Night 阅读(3) 评论(0) 推荐(0) 编辑