10 2021 档案

摘要:Python Ipdb Debug简单使用 参考链接: https://xmfbit.github.io/2017/08/21/debugging-with-ipdb/ https://blog.csdn.net/u014015972/article/details/51705292 https:/ 阅读全文
posted @ 2021-10-29 02:29 SethDeng 阅读(261) 评论(0) 推荐(0)
摘要:SoftMax函数: 参考链接:https://zhuanlan.zhihu.com/p/105722023 1 定义: Softmax 的核心在于 soft,而 soft 有软的含义,与之相对的是 hard 硬。很多场景中需要我们找出数组所有元素中值最大的元素,实质上都是求的 hardmax 。下 阅读全文
posted @ 2021-10-28 12:26 SethDeng 阅读(155) 评论(0) 推荐(0)
摘要:激活函数简单原理及使用: 参考链接: https://zhuanlan.zhihu.com/p/172254089 https://zhuanlan.zhihu.com/p/122267172 目前用到的几个激活函数的发展及简单使用: 1 Sigmoid: Sigmoid 的函数图像如上所示,从图像 阅读全文
posted @ 2021-10-28 02:41 SethDeng 阅读(515) 评论(0) 推荐(0)
摘要:Backbones(ResNet12/18、WRN、ConvNet) 复现链接:https://github.com/SethDeng/Backbones_In_Embedding 存在的问题: 1、WRN不对劲(准确度很差、训练时间很长) 2、train_acc < test_acc 阅读全文
posted @ 2021-10-28 01:28 SethDeng 阅读(42) 评论(0) 推荐(0)
摘要:Torch 中 view() & size() 在阅读论文源码过程中,经常会看到如下的命令: x = x.view(x.size(0), -1) # 改变 tensor 的形态 下面,本文简单介绍一下 view() 和 size() 函数的作用: view() import torch # 用法一 阅读全文
posted @ 2021-10-21 11:18 SethDeng 阅读(822) 评论(0) 推荐(0)
摘要:FLOPS & FLOPs & MACs 参考链接: https://www.zhihu.com/question/65305385 https://zhuanlan.zhihu.com/p/144938518 https://zhuanlan.zhihu.com/p/137719986 https 阅读全文
posted @ 2021-10-15 09:20 SethDeng 阅读(1081) 评论(1) 推荐(0)
摘要:Differentiable Architecture Search Abstract: 将离散域的结构搜索问题转化为连续域的搜索问题,将计算速度提升了几个量级。 Contribution: 提出了一种基于双层优化的可微网络结构搜索算法,该算法适用于卷积和递归结构。 DARTS流程:(a)边上的操作 阅读全文
posted @ 2021-10-10 01:45 SethDeng 阅读(144) 评论(0) 推荐(0)
摘要:GPU & Nvidia Driver & Cuda & Cudatoolkit & Cudnn & Torch & Torchvision(简洁介绍) 先放一个比较完整的介绍:https://zhuanlan.zhihu.com/p/91334380 GPU: 就是显卡,用于深度学习计算的显卡基本 阅读全文
posted @ 2021-10-09 22:10 SethDeng 阅读(307) 评论(0) 推荐(0)
摘要:Tensor.squeeze & Tensor.unsqueeze 1 Tensor的维度 张量的的定义:一个 n 维的张量就是一维数组中的所有元素都是 n - 1 维的张量。 举例说明: import torch a = torch.rand(3) b = torch.rand(2, 3) c = 阅读全文
posted @ 2021-10-08 15:43 SethDeng 阅读(303) 评论(0) 推荐(0)
摘要:Distribution Propagation Graph Network for Few-shot Learning Abstract: This paper propose DPGN,which conveys both the distribution-level relations and 阅读全文
posted @ 2021-10-06 16:16 SethDeng 阅读(105) 评论(0) 推荐(0)
摘要:训练集 & 验证集 & 测试集 划分比例一般为 6:2:2 训练集: 用来拟合模型,通过设置模型内部的参数,训练模型。 验证集: 作用是当通过训练集训练出多个模型后,为了能找出效果最佳的模型,使用各个模型对验证集数据进行预测,并记录模型准确率。选出效果最佳的模型所对应的参数,即用来调整模型参数。 测 阅读全文
posted @ 2021-10-06 15:32 SethDeng 阅读(456) 评论(0) 推荐(0)
摘要:FSL-GNN代码解读 main.py(主函数) 1、加载数据集: train_loader = generator.Generator(args.dataset_root, args, partition='train', dataset=args.dataset) 2、初始化或加载模型: enc 阅读全文
posted @ 2021-10-06 14:45 SethDeng 阅读(485) 评论(0) 推荐(0)
摘要:FSL-GNN Abstract: The first paper to use GNN handle the few-shot classification. Contributions: Using GNN to handle few-shot classification as a super 阅读全文
posted @ 2021-10-06 02:06 SethDeng 阅读(133) 评论(0) 推荐(0)
摘要:Learning to Propagate Labels: Transductive Propagation Network for Few-shot Learning Abstract: This paper propose Transductive Propagation Network (TP 阅读全文
posted @ 2021-10-06 01:19 SethDeng 阅读(245) 评论(0) 推荐(0)
摘要:Git 代理设置 问题:git clone 太慢,甚至有时 git push 都不行 解决方案: 1 全局代理设置 git config --global http.proxy http://127.0.0.1:7890 git config --global https.proxy https:/ 阅读全文
posted @ 2021-10-05 01:24 SethDeng 阅读(295) 评论(0) 推荐(0)
摘要:VScode使用Tips(不定期更新): 1、代码自动换行 https://blog.csdn.net/weixin_42689147/article/details/87366004 2、解决打开新文件会覆盖旧文件的问题 文件 - 首选项 - 设置 - 搜索show tabs,然后找到 Workb 阅读全文
posted @ 2021-10-03 18:04 SethDeng 阅读(98) 评论(0) 推荐(0)
摘要:Torch中的梯度计算 torch中训练顺序大致如下: 1、optimizer.zero_grad() # 将模型的参数梯度初始化为0 2、outputs=model(inputs) # 前向传播计算预测值 3、loss = cost(outputs, y_train) # 计算当前损失 4、los 阅读全文
posted @ 2021-10-03 18:03 SethDeng 阅读(529) 评论(0) 推荐(0)
摘要:终止Torch程序 1、应使用 Ctrl + C 在训练中直接终止进程,Ctrl + Z 只是挂起而已! 2、若是多卡训练时终止程序,有时会出现子进程仍占用显存,可通过以下操作释放显存: nvidia-smi # 查看GPU占用情况 ps ax # 查看GPU上进程情况 sudo kill -9 N 阅读全文
posted @ 2021-10-03 18:01 SethDeng 阅读(477) 评论(0) 推荐(0)
摘要:Multi-GPU原理 torch单机多卡基本原理:使用多张卡的GPU单元来加速运算(实例如下): 假设我们一次性读入一个batch的数据, 其大小为[16, 10, 5],我们有四张卡可以使用。那么计算过程遵循以下步骤: 1、pytorch先把初始模型同步放到4个GPU中 2、将数据分为4份,按照 阅读全文
posted @ 2021-10-03 18:00 SethDeng 阅读(211) 评论(0) 推荐(0)
摘要:nn.Conv2d() & nn.Max_pool2d() & nn.BatchNorm2d()& nn.Dropout2d() nn.Conv2d(): 一个二维卷积层的输入张量为(\(N, C_{in}, H, W\)),输出为 (\(N, C_{out}, H, W\)),分别为:批数据量、通 阅读全文
posted @ 2021-10-03 17:58 SethDeng 阅读(716) 评论(0) 推荐(0)
摘要:训练时间统计 1 引入time模块 import time 2 在epoch循环开头处加入 begin = time.time() 3 在epoch循环末尾处加入 time_cost = time.time() - begin print('Training complete in {:.0f}m 阅读全文
posted @ 2021-10-03 17:55 SethDeng 阅读(109) 评论(0) 推荐(0)