kZjPBD.jpg
摘要: C - Rooks Defenders 线段树模板,维护:1)v:个数 , 2)sum:v的个数是否大于0. // #include"bits/stdc++.h" #include"iostream" using namespace std; const int N = 2e5; struct No 阅读全文
posted @ 2024-02-25 22:27 Through_The_Night 阅读(2) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-05-17 20:07 Through_The_Night 阅读(86) 评论(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 阅读(463) 评论(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 阅读(28) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-04-16 20:22 Through_The_Night 阅读(29) 评论(0) 推荐(0) 编辑
摘要: https://www.hacther.cn/122.html 阅读全文
posted @ 2022-04-07 16:42 Through_The_Night 阅读(4) 评论(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 阅读(60) 评论(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 阅读(110) 评论(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 阅读(1201) 评论(0) 推荐(0) 编辑
摘要: 阅读全文
posted @ 2022-03-06 10:14 Through_The_Night 阅读(69) 评论(0) 推荐(0) 编辑