上一页 1 2 3 4 5 6 7 8 ··· 73 下一页
摘要: 这里是ubuntu系统,其他系统我忘了 ls -l 出来有没有total字符了。 ls -l | grep -v total | wc -l 阅读全文
posted @ 2023-10-27 21:13 Dsp Tian 阅读(15) 评论(0) 推荐(0) 编辑
摘要: 统计模型参数量,方便判断不同模型大小: import torch import torch.nn as nn class AlexNet(nn.Module): def __init__(self): super(AlexNet, self).__init__() self.conv1 = nn.C 阅读全文
posted @ 2023-10-27 21:01 Dsp Tian 阅读(49) 评论(0) 推荐(0) 编辑
摘要: 首先来Miniconda — miniconda documentation这个网站安装miniconda。 下面是一些常用的命令。 1. 安装完成之后,conda命令有时候不识别,需要init一下。 ~/miniconda3/bin/conda init bash ~/miniconda3/bin 阅读全文
posted @ 2023-10-24 21:40 Dsp Tian 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 比如我们拿到了一组imu的原始加速度和角速度数据。 通过卡尔曼或互补滤波得到了三个旋转角,想要可视化一下。 可以用下面这种方法,转成旋转矩阵后简单组合一下即可。 matlab代码如下: clear all;close all;clc; ang = load('ang.txt'); roll = an 阅读全文
posted @ 2023-10-21 17:29 Dsp Tian 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 测试模型用之前文章训练的Alexnet模型。 首先将pth文件转为onnx文件: import torch import torch.nn as nn # 自定义AlexNet模型 class AlexNet(nn.Module): def __init__(self): super(AlexNet 阅读全文
posted @ 2023-10-19 22:56 Dsp Tian 阅读(115) 评论(0) 推荐(0) 编辑
摘要: 用pip install xxx安装库时有时候会遇到下面提示: To fix this you could try to: 1. loosen the range of package versions you've specified 2. remove package versions to a 阅读全文
posted @ 2023-10-19 22:12 Dsp Tian 阅读(2389) 评论(0) 推荐(0) 编辑
摘要: 运行时忽略掉警告: import warnings warnings.filterwarnings("ignore") 阅读全文
posted @ 2023-10-19 20:59 Dsp Tian 阅读(23) 评论(0) 推荐(0) 编辑
摘要: python安装库比较多的时候,创建虚拟环境方便管理。 安装: sudo apt install python3-venv 创建: python3 -m venv env 激活: source ./env/bin/activate 退出: deactivate 阅读全文
posted @ 2023-10-12 21:11 Dsp Tian 阅读(14) 评论(0) 推荐(0) 编辑
摘要: cudnn为网络每一卷积层选最优实现方法,加速网络训练。 设置如下: torch.backends.cudnn.benchmark = True 加速条件如下: 1. 输入数据在训练过程中一般不变化。 2. 数据量较大,并可以同时加载到GPU内存中。 3. 训练次数比较多。 阅读全文
posted @ 2023-10-09 23:36 Dsp Tian 阅读(40) 评论(0) 推荐(0) 编辑
摘要: 安装完pytorch、cuda和cudnn之后,可以先判断是否可用。 import torch print('CUDA版本:',torch.version.cuda) print('Pytorch版本:',torch.__version__) print('显卡是否可用:','可用' if(torc 阅读全文
posted @ 2023-10-09 21:19 Dsp Tian 阅读(434) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 ··· 73 下一页