摘要: register buffer 定义模型能用torch.save保存的、但是不更新参数。 使用:只要是nn.Module的子类就能直接self.调用使用: class A(nn.Module): #... self.register_buffer( 'betas', torch.linspace(b 阅读全文
posted @ 2024-02-01 10:22 ZephyrYin 阅读(374) 评论(0) 推荐(0) 编辑
摘要: 0表示标准输入, 1表示标准输出, 2表示标准错误 以find命令为例: find /usr -name "libc.so.6" 2>/dev/null 在命令的后面空格后,加上一串附加的命令,把 “标准错误”输出到/dev/null中(丢弃)。 出了丢弃,你也可以用一个路径,让“标准错误”输出到文 阅读全文
posted @ 2024-01-31 09:35 ZephyrYin 阅读(39) 评论(0) 推荐(0) 编辑
摘要: ps -p 1 -o comm=命令,如果返回的是"init",则说明是CentOS系统;如果返回的是"systemd",则说明是Ubuntu系统。 lsb_release -a命令 cat /etc/os-release命令 阅读全文
posted @ 2024-01-30 16:41 ZephyrYin 阅读(1074) 评论(0) 推荐(0) 编辑
摘要: pip install -e ./ 对原始包修改代码会即刻生效,文档中叫develop mode -e,--editable <path/url> Install a project in editable mode (i.e. setuptools "develop mode") from a l 阅读全文
posted @ 2024-01-30 15:20 ZephyrYin 阅读(215) 评论(0) 推荐(0) 编辑
摘要: 导出 直接看conda的document:https://docs.conda.io/projects/conda/en/latest/commands/env/export.html conda env export conda env export --file SOME_FILE 重建 con 阅读全文
posted @ 2024-01-30 14:50 ZephyrYin 阅读(43) 评论(0) 推荐(0) 编辑
摘要: 很多帖子都说了,设置requires_grad_()就行。 但是我这次遇到的不一样,设置了都不行。 我是这种情况,在前面设置了torch.no_grad():,又在这个的作用域下进行了requires_grad_(),这是不起作用的。 简单版: with torch.no_grad(): model 阅读全文
posted @ 2023-12-26 11:10 ZephyrYin 阅读(57) 评论(0) 推荐(0) 编辑
摘要: Leaderboard: https://www.kaggle.com/competitions/open-problems-single-cell-perturbations/leaderboard 2nd Solution: https://www.kaggle.com/competitions 阅读全文
posted @ 2023-12-22 23:41 ZephyrYin 阅读(11) 评论(0) 推荐(0) 编辑
摘要: 有一种可能的情景: A/B/C路径中B不存在,那么就存不下东西,而且cv2也不报exception。 阅读全文
posted @ 2023-12-12 14:56 ZephyrYin 阅读(762) 评论(0) 推荐(0) 编辑
摘要: 现在attention的热度已经过去了,基本上所有的attention都是transformer的kqv形式的,甚至只要说道attention,默认就是transformer的attention。 为避免遗忘历史,我这里做一个小总结。繁杂的att我就不去了解了,只了解下经典的。 以下以hi 阅读全文
posted @ 2023-12-11 14:45 ZephyrYin 阅读(19) 评论(0) 推荐(0) 编辑
摘要: 场景 写了gitignore,但是漏写了不少东西,结果很多不想加进去的东西也被git add了,此时还没有commit,想把刚刚add的东西去掉,不要让他commit进去 使用 使用 git rm。 一种是 git rm --cached "文件路径",不删除物理文件,仅将该文件从缓存中删除; 一种 阅读全文
posted @ 2023-12-07 11:30 ZephyrYin 阅读(43) 评论(0) 推荐(0) 编辑
点击右上角即可分享
微信分享提示