当前位置: 首页 > news >正文

网站如何自己做支付网站音乐播放器插件

网站如何自己做支付,网站音乐播放器插件,大学科研项目做网站,0基础网站建设模板文章目录 Detectron2环境配置搭建python 环境安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit1、Cuda \CUDNN2、 PyTorch、 torchvision、cudatoolkit进入python测试:错误信息 3、detectron2环境在安装detecteron中,遇到报错:编译的时…

文章目录

  • Detectron2环境配置
    • 搭建python 环境
    • 安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit
      • 1、Cuda \CUDNN
      • 2、 PyTorch、 torchvision、cudatoolkit
        • 进入python测试:
        • 错误信息
      • 3、detectron2环境
        • 在安装detecteron中,遇到报错:
        • 编译的时候failed with exit status 1错误
    • 运行demo.py

Detectron2环境配置

需要配置好相应版本的NVIDIA驱动、CUDA、Pytorch、visual studio,visual stdio2019是为了配置gcc g++的。
配置pytorch的链接.
配置CUDA的链接
在这里插入图片描述

可参考项目中的官方安装说明

搭建python 环境

conda create -n detectron2 python
conda activate detectron2

安装Cuda \CUDNN 、PyTorch、 torchvision、cudatoolkit

1、Cuda \CUDNN

可以查询自己的nvcc-v查询自己cuda版本,查看安装指南

2、 PyTorch、 torchvision、cudatoolkit

终端输入:

nvcc -V
得到输出结果,cuda版本为12.1

在这里插入图片描述

# CUDA 11.8
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=11.8 -c pytorch -c nvidia
# CUDA 12.1
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 pytorch-cuda=12.1 -c pytorch -c nvidia
# CPU Only
conda install pytorch==2.3.1 torchvision==0.18.1 torchaudio==2.3.1 cpuonly -c pytorch
进入python测试:

import torch
import torchvision
torch.cuda.is_available()

在这里插入图片描述

错误信息

在这里插入图片描述
解决办法链接

Anaconda>DLLs,重启shell

3、detectron2环境

在此路径下,激活detectron2环境,输入:

python setup.py build develop

在这里插入图片描述
成功安装detectron2。

在安装detecteron中,遇到报错:

error: command ‘C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA\v11.6\bin\nvcc.exe’ failed with exit code 1
解决办法:

找到如下文件:

detectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cudetectron2\layers\csrc\nms_rotated\nms_rotated_cuda.cu

// Copyright (c) Facebook, Inc. and its affiliates.
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
#ifdef WITH_CUDA
#include "../box_iou_rotated/box_iou_rotated_utils.h"
#endif
// TODO avoid this when pytorch supports "same directory" hipification
#ifdef WITH_HIP
#include "box_iou_rotated/box_iou_rotated_utils.h"
#endif

修改为

// Copyright (c) Facebook, Inc. and its affiliates.
#include <ATen/ATen.h>
#include <ATen/cuda/CUDAContext.h>
#include <c10/cuda/CUDAGuard.h>
#include <ATen/cuda/CUDAApplyUtils.cuh>
/*#ifdef WITH_CUDA
#include "../box_iou_rotated/box_iou_rotated_utils.h"
#endif
// TODO avoid this when pytorch supports "same directory" hipification
#ifdef WITH_HIP
#include "box_iou_rotated/box_iou_rotated_utils.h"
#endif*/
#include "box_iou_rotated/box_iou_rotated_utils.h"

修改完毕之后,再次运行 python setup.py build develop。

编译的时候failed with exit status 1错误

编译的时候,我们遇到了“command ‘…/…/bin/nvcc.exe’ failed with exit status 1”,修改策略
“…/…/detectron2/detectron2/layers/csrc/nms_rotated/nms_rotated_cuda.cu” 文件中#include “…” 路径错误 ,然后编译成功。

运行demo.py

python demo.py --config-file ../configs/COCO-InstanceSegmentation/mask_rcnn_R_50_FPN_3x.yaml --input rgb.png --output 1.png --opts MODEL.WEIGHTS model_final_f10217.pkl
http://www.yayakq.cn/news/96913/

相关文章:

  • 合肥做网站便宜典当行 网站
  • 网站建设和应用的情况做公司网站的模板下载
  • 采集网站会收录吗wordpress整合ckplayer
  • dedecms医院网站wap模板(橙色)大兴企业网站建设公司
  • 如何做自己的淘客网站给人家做的网站想改怎么改
  • 潜山云建站网站建设游戏网页设计教程
  • 电脑怎么做服务器 网站上海住房城乡建设网站证件查询
  • aaaa景区网站建设标准东莞网站开发后缀
  • 百度公司做网站优化多少钱海口网页建站模板
  • 影响网站用户体验张家港网站建设早晨设计
  • 建设部咨询资质网站网站建设改手机号
  • 免费网站部署如何在租用的服务器上部署自己的网站 mysql
  • 手机怎样下载安装建设银行网站dnf辅助源码论坛
  • 台州网站制作服务搜索引擎优化是做什么
  • 网站的推广方式包括友情链接检测方法
  • 上海网站建设小程序开发外贸网站模板免费
  • 常州做网站公司有哪些厦门网站建设推广哪家好
  • 专业做网站公司 前景美仑-专门做服装的网站
  • 品牌做网站一体化企业管理软件
  • 房管局 网站做房查外汇网站怎么做优外汇网站
  • 吉安网站建设优化服务模板免费下载网站
  • 建设银行网站的目的是什么微信运营是干嘛的
  • 手机建网站详细步骤杭州seo推广服务
  • 雍鑫建设集团官方网站可以做软件的网站
  • 相册特效手机网站广东网页空间分销
  • 哪个网站可以做创意短视频wordpress个人支付
  • 网站开发需要哪些人才app推广服务部
  • 辽宁建设官方网站seo内容优化是什么
  • 青岛专业做商业房的网站贵阳网站制作系统
  • 公司设计网站需要注意哪些教着做美食的网站