- 博客(40)
- 资源 (1)
- 问答 (1)
- 收藏
- 关注
原创 numpy学习:reshape和resize
resize:无返回值,所谓无返回值,即会对原始多维数组进行修改;reshape:有返回值,所谓有返回值,即不对原始。
2023-08-31 14:44:30 346
原创 Ubuntu 系统和x3派 NFS 安装和配置
----------------- 客户机 x3 派 ---------------------------------------------- 服务机 Ubuntu--------------------------------添加 /home/nfs *(insecure,rw,sync,no_subtree_check)按 esc 退出编辑模式,然后( :wq!) ) 强制保存退出。在 /home下新建nfs文件夹。按 a 或 i 进入编辑模式。
2023-04-21 15:55:24 507
原创 SyntaxError: Non-UTF-8 code starting with ‘\xb4‘ in file x3.py on line 10, but no encoding declared;
表示设置编码格式为utf8即可解决。
2023-03-15 17:17:55 701
原创 c1: fatal error C1083: 无法打开源文件: “pycocotools/_mask.c”: No such file or directoryerror: Setup script
c1: fatal error C1083: 无法打开源文件: “pycocotools/_mask.c”: No such file or directory。
2023-03-15 09:58:16 725
原创 ValueError: numpy.ndarray size changed, may indicate binary incompatibility. Expected 88 from C head
原因:numpy 版本低
2022-07-05 14:24:01 1197
原创 ERROR: No matching distribution found for git
ERROR: No matching distribution found for git
2022-06-07 09:51:08 5244
原创 tensorboard命令
tensorboard --logdir=E:/py-pro/liu-runda-yolov3-train-master/train2/train/log_dir/ --host=127.0.0.1
2022-05-19 10:54:59 467
原创 UserWarning: You are trying to export the model with onnx:Upsample for ONNX opset version 9. This op
UserWarning: You are trying to export the model with onnx:Upsample for ONNX opset version 9.This operator might cause results to not match the expected results by PyTorch.ONNX's Upsample/Resize operator did not match Pytorch's Interpolation until opset ..
2022-04-28 09:40:50 679 1
原创 TensorRT 配置
step1:英伟达官网下载TensorRT,并解压。NVIDIA TensorRT | NVIDIA Developerhttps://developer.nvidia.com/zh-cn/tensorrtstep2:将TensorRT 的lib文件夹里的.dll 文件复制到CUDA 的bin文件夹中,比如我的 D:\TensorRT-8.2.4.2\lib 中的.dll 文件 复制到C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11....
2022-04-24 14:47:49 3423
原创 To search for alternate channels that may provide the conda package you‘re looking for, navigate
一、描述:To search for alternate channels that may provide the conda package you’re looking for, navigate to https://anaconda.organd use the search bar at the top of the page.二、解决方法:在anaconda prompt(anaconda3)下输入以下命令:conda config --add channels cond..
2022-04-21 22:55:01 12872
原创 OpenVINO 环境配置
step1 :openvino 下载:下载英特尔® 发行版 OpenVINO™ 工具套件下载适用于 Linux、Windows 或 macOS 的英特尔® 发行版 OpenVINO™ 工具套件。https://www.intel.cn/content/www/cn/zh/developer/tools/openvino-toolkit/download.html?elq_cid=7828985_ts1650091588979下载完成后,按照要求安装和安装依赖项,比如我选择的是默认安装路径。step2
2022-04-18 14:46:47 2602
原创 [W IndexingUtils.h:25] Warning: indexing with dtype torch.uint8 is now deprecated, please use a dtyp
Pytorch 遇到[W IndexingUtils.h:25] Warning: indexing with dtype torch. uint8 is now deprecated警告信息*_tanpengjie的博客-CSDN博客
2022-02-28 22:58:11 660
原创 pytorch中模型的保存与加载:torch.save(),torch.load()
pytorch保存模型与加载:模型的保存torch.save(net,PATH)#保存模型的整个网络,包括网络的整个结构和参数torch.save(net.state_dict,PATH)#只保存网络中的参数模型的加载分别对应上边的加载方法。model_dict=torch.load(PATH)model_dict=net.load_state_dict(torch.load(PATH))...
2022-01-05 09:35:12 1579
原创 Python3 super().__init__()
super().__init__() 的含义是 调用父类的__init__然后给子类创建了self.x属性,而不是调用父类的属性。
2021-12-02 10:57:25 308
原创 matlab 读视频
fileName = '1.MP4';obj = VideoReader(fileName);numFrames = obj.NumberOfFrames;% 帧的总数for k = 1 : numFrames% 读取数据 frame = read(obj,k); imshow(frame);%显示帧 imwrite(frame,strcat(num2str(k),'.jpg'),'jpg');% 保存帧end...
2021-11-17 16:15:30 237
转载 gym 的 emv.unwrapped 的含义
创建环境:env = gym.make('CartPole-v0')返回的这个env其实并非CartPole类本身,而是一个经过包装的环境:据说gym的多数环境都用TimeLimit(源码)包装了,以限制Epoch,就是step的次数限制,比如限定为200次。所以小车保持平衡200步后,就会失败。用env.unwrapped可以得到原始的类,原始类想step多久就多久,不会200步后失败:...
2021-10-13 15:54:36 515
原创 openAI gym 的环境
from gym import envsprint(envs.registry.all())上述代码可查看注册的环境。下面列出gym包含的环境EnvSpec(Acrobot-v1),EnvSpec(AirRaid-ram-v0),EnvSpec(AirRaid-ram-v4),EnvSpec(AirRaid-ramDeterministic-v0),EnvSpec(AirRaid-ramDeterministic-v4),EnvSpec(AirRaid-ramNoFrameskip-
2021-10-12 13:39:08 351
原创 ImportError: sys.meta_path is None, Python is likely shutting down
我的平台是 win10 + python3.6 + pytorch1.7.0在最后添加env.close() ,关闭环境
2021-10-12 13:25:06 243
原创 gym.error.DependencyNotInstalled: Found neither the ffmpeg nor avconv executables. On OS X, you can
问题描述 :gym.error.DependencyNotInstalled: Found neither the ffmpeg nor avconv executables. On OS X, you can install ffmpeg via `brew install ffmpeg`. On most Ubuntu variants, `sudo apt-get install ffmpeg` should do it. On Ubuntu 14.04, however, you'll need
2021-10-12 08:53:42 350
原创 Exception: ROM is missing for pong, see https://github.com/openai/atari-py#roms for instructions
我的环境是:win10 + python3.6 + pytorch1.7.0gym 版本是 0.13.0安装pip install atari-py==0.2.5 解决
2021-10-11 18:22:21 408
原创 gym.error.DependencyNotInstalled: No module named ‘atari_py‘. (HINT: you can install Atari dependenc
我的环境是:win10 + python3.6 + pytorch1.7.0gym 版本是 0.13.0安装pip install atari-py 解决
2021-10-11 18:21:32 572
原创 numpy 变量 交换ndarray 的维度
img = np.transpose(img, (1, 2, 0))原img是1*28*28(c*h*w) 的手写字体数据集的图像,将图像的维度转换为28*28*1(h*w*c)
2021-10-03 10:52:39 795
原创 RuntimeError: stack expects each tensor to be equal size, but got [1, 5] at entry 0 and [3, 5] at en
https://blog.csdn.net/yuxiang8546/article/details/118761999在 dataset 类里 添加def yolo_dataset_collate(batch): images = [] bboxes = [] for img, box in batch: images.append(img) bboxes.append(box) images = np.array(images)
2021-07-15 16:22:20 8167 4
原创 读图 to tensor
img = torch.from_numpy( cv2.imread('C:/Users/gaojo/Desktop/22.png') ).float()img = torch.unsqueeze(img,0)img = img.permute(0,3,1,2)
2021-07-14 15:33:28 153
原创 RuntimeError: expected scalar type Byte but found Float
img = torch.from_numpy( cv2.imread('C:/Users/gaojo/Desktop/22.png') )改为 :img = torch.from_numpy( cv2.imread('C:/Users/gaojo/Desktop/22.png') ).float()
2021-07-14 14:08:29 2966 1
原创 Pytorch Tensor维度调换
permute如果四个维度表示上节的[batch,channel,h,w] ,如果想把channel放到最后去,形成[batch,h,w,channel],那么如果使用前面的维度交换,至少要交换两次(先13交换再12交换)。而使用permute可以直接指定维度新的所处位置,更加方便。示例代码:a = torch.rand(4, 3, 6, 7)print(a.permute(0, 2, 3, 1).shape)输出结果:torch.Size([4, 6, 7, 3])—————————
2021-07-14 14:02:19 1277
原创 Main主文件模板
import torch.optim as optimfrom LeNet5 import *from train import *from data_loader import *from test import *import torchfrom alexnet import *from minstSet import *from .
2020-08-23 21:01:55 186
原创 读Mnist 数据集
import numpy as npimport structimport matplotlib.pyplot as plt# 训练集文件train_images_idx3_ubyte_file = 'D:\\QQ消息记录\\1694233142\\FileRecv\\mnist\\mnist\\train-images.idx3-ubyte'# 训练集标签文件train_labels_idx1_ubyte_file = 'D:\\QQ消息记录\\1694233142\\FileRecv\\.
2020-08-23 20:59:38 252
原创 Dataloader 加载训练数据
import torchfrom torchvision import datasets, transformsdef data_loader(): train_data = torch.utils.data.DataLoader( # 加载训练数据 datasets.MNIST('../data', train=True, download=True, transform=transforms.Compose([ .
2020-08-23 20:56:15 461
原创 test 测试网络模板
from torch.autograd import Variableimport torch.nn.functional as Fdef test(model,test_loader,device): model.eval() # 设置为test模式 test_loss = 0 # 初始化测试损失值为0 correct = 0 # 初始化预测正确的数据个数为0 for data, target in test_loader: data = d.
2020-08-23 20:54:23 493
原创 train 训练网络模板
import torch.nn.functional as Ffrom torch.autograd import Variableimport numpy as npimport cv2from PIL import Imagefrom LeNet5 import *def train(i,model,train_Set,optimizer,device): model.train() for batch_idx,(data,target) in enumerate(t.
2020-08-23 20:53:33 706 1
原创 AlexNet
import torch.nn as nnclass alexnet(nn.Module): def __init__(self): super(alexnet,self).__init__() self.conv1 = nn.Sequential( nn.Conv2d(1,96,kernel_size=3,stride=1,padding=1), nn.ReLU(inplace=True) ,nn.MaxPool2d(kernel_size=3,stride.
2020-08-23 20:52:08 70
原创 LeNet5
import torch.nn as nnclass LeNet5(nn.Module): def __init__(self): super(LeNet5,self).__init__() self.conv1 = nn.Sequential( nn.Conv2d(1,6,5,1,2) , nn.ReLU() , nn.MaxPool2d(2,2) ) self.conv2 = nn.Sequential( nn.Conv2d(6,.
2020-08-23 20:49:07 166
原创 VS项目+openCV配置
第一步:配置openCV环境变量 例如我的电脑中将路径( E:\软件\安装包\opencv-3.3.0-vc14\opencv\build\x64\vc14\bin )添加到环境变量Path 下。第二步:将 include 和 lib 文件夹复制到 VS 项目下 例如 我的电脑中这两个文件夹在目录( E:\软件\安装包\opencv-3.3.0-vc14\opencv\build )和 ( E:\软件\安装包\open...
2020-08-03 11:22:31 154
原创 vs2017 社区版
找了半天,都是指向最新的vs版本,vs2019,我想用vs2017!!!终于找到了,留个印记:https://docs.microsoft.com/en-us/visualstudio/releasenotes/vs2017-relnotes————————————————版权声明:本文为CSDN博主「zhuxian2009」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请...
2020-05-02 11:46:52 838
空空如也
有关Yolov5-Deepsort-main的问题
2023-06-30
您的yolo v4 代码里 缺少 voc_annotation.py 这个文件
2021-08-28
TA创建的收藏夹 TA关注的收藏夹
TA关注的人