自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(29)
  • 收藏
  • 关注

原创 关于Pytorch的create_graph和retain_graph的一点小得

当我们想求二阶导时,用autograd.grad是执行了一次前向运算,但该函数默认不会保存计算图,因此并没有求导运算的过程,无法再继续用结果求二阶导。首先我们要搞清一个逻辑,就是在Pytorch中,张量间的计算产生计算图,而反向传递会导致计算图删除(反向即backward()函数,请注意,用autograd求导不会导致计算图被删除)。此外,retain_graph是retain当前的式子的计算图,当我们不想让backward()函数释放掉当前计算图时,我们可以使用retain_graph=True。

2023-07-21 21:39:10 562

原创 Leetcode Hot100|128.最长连续序列

Leetcode Hot100|128.最长连续序列

2022-12-06 22:17:42 280 1

原创 linux对有相同格式名称的文件进行批量操作(模糊匹配)

linux对有相同格式名称的文件进行批量操作(模糊匹配)

2022-11-27 16:04:53 1856

原创 学到的有用的东西(端口映射、flask、setup、串口)

最近学到的东西

2022-11-14 16:23:17 432

原创 Python版本和库的问题

一个教训

2022-11-12 20:41:02 672

原创 利用Python升级pip

pip

2022-11-12 15:23:45 201

原创 蓝桥杯2022国赛|选素数 Python

蓝桥杯2022国赛|选素数 Python

2022-11-09 11:37:58 771 2

原创 ROC曲线的一点记录

记录ROC、AUC的一些东西

2022-11-08 11:36:06 89

原创 Leetcode Hot100|121. 买卖股票的最佳时机 Python

Leetcode Hot100|121. 买卖股票的最佳时机 Python

2022-10-30 10:54:07 671

转载 【转载】梯度爆炸和梯度消失

梯度爆炸和梯度消失的原因,以及一些解决方案

2022-10-29 21:40:23 583

原创 Leetcode Hot100|114. 二叉树展开为链表 Python

Leetcode Hot100|114. 二叉树展开为链表 Python

2022-10-29 19:14:38 567

原创 CUDA报错:Out of Memory

RuntimeError: CUDA out of memory. Tried to allocate xx GiB (GPU 0; xx GiB total capacity; xx GiB already allocated; xx GiB free; xx GiB reserved in total by PyTorch) If reserved memory is >> allocated memory try setting max_split_size_mb to avoid

2022-10-28 17:20:04 11480 6

原创 Leetcode Hot100|105. 从前序与中序遍历序列构造二叉树 Python

Leetcode Hot100|105. 从前序与中序遍历序列构造二叉树 Python

2022-10-28 11:03:39 393

原创 Leetcode Hot100|104.二叉树的最大深度

Leetcode Hot100|104.二叉树的最大深度

2022-10-28 10:18:16 579

原创 Leetcode Hot100|102. 二叉树的层序遍历 Python

Leetcode Hot100|102. 二叉树的层序遍历 Python

2022-10-27 10:20:49 1233

原创 Leetcode Hot100|101. 对称二叉树 Python

Leetcode Hot100|101. 对称二叉树 Python

2022-10-26 11:29:56 1051

原创 Leetcode 1125. 最小的必要团队 Python

Leetcode 1125. 最小的必要团队 Python

2022-10-25 20:38:05 208

原创 Python关于函数传列表/Tensor赋值

Python关于函数传列表/Tensor赋值

2022-10-23 16:54:25 323

原创 Leetcode Hot100|98. 验证二叉搜索树 Python

Leetcode Hot100|98. 验证二叉搜索树 Python

2022-10-22 19:59:36 386

原创 Pip、conda清华源

pip/conda清华源

2022-10-21 21:36:49 390

原创 Leetcode Hot100|96.不同的二叉搜索树 Python

Leetcode Hot100 96.不同的二叉搜索树 图解

2022-10-21 11:15:58 136

原创 Softmax函数下的交叉熵损失含义与求导

自信息、熵、交叉熵、相对熵的简介。Softmax函数与交叉熵损失函数及其求导。

2022-10-20 22:57:48 2731

原创 Leetcode Hot100|94.二叉树的中序遍历 Python

Leetcode Hot100|94.二叉树的中序遍历 Python

2022-10-20 13:32:11 274

原创 Leetcode Hot100|85.最大矩形 Python

力扣 Hot100|85.最大矩形

2022-10-19 17:14:03 251

原创 Leetcode Hot100|84. 柱状图中最大的矩形 Python

力扣Hot100|84. 柱形图中最大矩形 Python实现

2022-10-16 21:14:14 230 1

原创 Leetcode Hot100|79.单词搜索 Python

Leetcode Hot100 79.单词搜索

2022-10-15 16:40:26 210

原创 Leecode Hot100 78.子集 Python

LeetCode 78题

2022-10-14 20:06:58 119

原创 LeetCode Hot100 76.最小覆盖子串

力扣hot100 题目76

2022-10-14 11:03:40 145

原创 Leetcode Hot100 75.颜色分类

LeetCode Hot100 75.颜色分类题解

2022-10-12 16:34:03 118 1

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除