自定义博客皮肤VIP专享

*博客头图:

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

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

博客底图:

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

栏目图:

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

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

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

原创 常用损失函数归总

(5)2018 Cosface loss:腾讯在2018年《CosFace: Large Margin Cosine Loss for Deep Face Recognition》中提出的 二分类损失。(3)2018 GM-LOSS:Rethinking Feature Distribution for Loss Functions in Image Classification 多分类。原文中文中显示GM优于softmax+centerloss;优于Large-margin softmax loss。

2023-09-21 22:06:34 95

原创 mathtype公式转换为latex

如图11所示,首先在MathType中输入图形公式,然后在选项-剪切和复制选项-转换其他文字,选择LaTeX 2.09 and later。

2023-06-14 19:19:08 809

原创 unzip函数的理解

作用:依次取出self.linears[0]和query,self.linears[1]和key,self.linears[2]和value 取名l和x,分别对这三对执行l(x).view(nbatches, -1, self.h, self.d_k).transpose(1, 2)操作。对每对l,x执行:l(x).view(nbatches, -1, self.h, self.d_k).transpose(1, 2)

2023-03-18 07:26:12 176

原创 tf.gather 在指定轴上按指定索引选择tensor

tf.gather 索引tensor

2023-02-28 09:59:33 115

原创 TensorFlow2.0会话报RuntimeError: The Session graph is empty.错误

【代码】TensorFlow2.0会话报RuntimeError: The Session graph is empty.错误。

2023-02-28 08:49:31 62

原创 Latex 双引号和连字符问题

win-size:7" is window size, ``dim" is vector dimensions, 双引号单独输入一对引号在latex中是无法显示的,需要使用 TAB键上面的。

2023-02-10 23:48:01 335

原创 GPU与CPU版本兼容性问题

GPU与CPU兼容

2022-12-07 22:33:03 226

原创 torch的几个用法

几个torch函数的用法

2022-12-07 18:07:47 200

转载 基于linux的几款物联网操作系统

开源物联网平台

2022-11-01 11:58:57 831

原创 常见深度学习模型复杂度

复杂度

2022-10-11 15:45:39 194

原创 使用python画sci风格的图

python画sci图

2022-09-29 16:11:51 1449

原创 EEGNET

EGGNET

2022-08-31 15:44:06 235

原创 广播机制使用的例子:2维矩阵与3维矩阵的乘法(matmul)和 element-wise(mul)

广播机制

2022-06-16 17:37:35 1241

原创 利用正则表达式画loss图

import redata1_loss=[]data2_loss=[]#文件中各提取关键数值所在的位置Epoch = 0train_loss = 0train_acc = 1test_loss =2test_acc = 3f =open(“./loss.txt”, ‘r’, encoding=“utf8”)lines = f.readline()while lines:result1 = re.findall(r’\d+',lines) # 读取整数result2 = re.fi

2022-05-16 21:00:18 140

原创 torch.cat的用法

torch.cat 将两个tensor拼接在一起,即拼接、联系在一起的意思;使用torch.cat((A, B),dim)时,除拼接dim维对应的值不同外,其余维的数值需一致A = torch.ones(2,3)B = 2 * torch.ones(4,3)C = torch.cat((A, B),dim=0)print(C.shape)D = 2 * torch.ones(2,4)C = torch.cat((A, D),dim=1)print(C.shape)...

2022-04-22 14:09:23 183

原创 使用thop统计模型flops和#param.

from thop import profiledevice = 'cuda:1'model = Transformer().to(device)input = torch.randn(1, 201, 192).to(device)macs, params = profile(model, inputs=(input,))print("macs\params:",macs,params)

2022-04-20 18:41:31 1331

原创 多GPU运行torch

34 # model = BiLSTM_Attention(128, 64, 2, 40, True)35 model = Transformer()36 model = nn.DataParallel(model, device_ids=[0, 1, 2, 3]).cuda() # 增加改行代码后即可运行多GPU环境37 optimizer = torch.optim.Adam(model.parameters(), lr=opt.init_lr)...

2022-04-19 09:47:50 1528

原创 pip install 安装时出现Could not fetch URL https://pypi.org/simple/pip/: There was a problem

pip install 安装时出现Could not fetch URL https://pypi.org/simple/pip/: There was a problem解决办法:1.进入命令行,在当前用户目录下创建pip文件夹2.在pip文件夹下面创建pip.ini文件,pip.ini配置内容如下:[global]index-url=http://mirrors.aliyun.com/pypi/simple/[install]trusted-host=mirrors.aliyun.com

2021-12-10 19:29:39 1613

原创 Python导入模块的3种方式

这里写自定义目录标题欢迎使用Markdown编辑器新的改变功能快捷键合理的创建标题,有助于目录的生成如何改变文本的样式插入链接与图片如何插入一段漂亮的代码片生成一个适合你的列表创建一个表格设定内容居中、居左、居右SmartyPants创建一个自定义列表如何创建一个注脚注释也是必不可少的KaTeX数学公式新的甘特图功能,丰富你的文章UML 图表FLowchart流程图导出与导入导出导入Python导入模块的3种方式(超级详细)http://c.biancheng.net/view/4645.html欢迎

2021-11-22 19:29:22 1040

原创 pip安装torch1.7报错,ERROR: torch has an invalid wheel, .dist-info directory not found

安装cpu版本,使用如下命令:pip install torch1.7.0+cpu torchvision0.8.1+cpu torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_stable.html安装Gpu版本,使用如下命令:pip install torch=1.7.0 torchvision=0.8.1 torchaudio===0.7.0 -f https://download.pytorch.org/whl/torch_

2021-11-04 21:31:38 8147

原创 常用深度学习数据集

几个公开数据集的地址(1)cocohttps://cocodataset.org/#download(2)roboflowhttps://public.roboflow.com/object-detection/handshttps://blog.csdn.net/qq_39377134/article/details/103128970

2021-11-04 21:29:19 101

原创 Windows安装Pycocotools(Microsoft Visual C++ 14.0 or greater is required.报错提示解决

【深度学习】Windows安装Pycocotools(Microsoft Visual C++ 14.0 or greater is required.报错提示解决https://www.cnblogs.com/Flat-White/p/15123308.html

2021-10-15 00:00:38 64

原创 2021-08-31

文献翻译:含分割、分类等论文解释:SnailTyan/deep-learning-papers-translationhttps://github.com/SnailTyan/deep-learning-papers-translation

2021-08-31 16:39:13 48

原创 stn 解释比较清楚的文章

https://www.cnblogs.com/liaohuiqiang/p/9226335.html

2021-08-26 16:41:08 69

原创 arima 基本资料转载

arima视频:https://www.bilibili.com/video/BV1Ks411V7W4?p=2arima视频对应的资料链接:https://blog.csdn.net/weixin_41988628/article/details/83149849ARIMA模型实例https://blog.csdn.net/sunnyxidian/article/details/929465...

2020-04-20 21:56:05 140

原创 定性定量分析方法

2020-04-20 21:45:13 1374

原创 Python 安装第三方包方法

原文链接:https://www.cnblogs.com/xiaoguan-bky/p/11184740.html方法一:pip命令行直接安装  打开cmd命令窗口,通过命令 pip install 包名 进行第三库安装  l注意:pip库包不是最新的,可随后对pip包进行更新,更新命令:python -m pip install --upgrade pip。方法二:手动下载第三方库,在使...

2019-10-13 10:26:05 137

空空如也

空空如也

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

TA关注的人

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