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

常州建设局官方网站最有效的宣传方式

常州建设局官方网站,最有效的宣传方式,潍坊设计网站建设,怎么建立自己的小程序文章目录 前言下载detectron2安装Visual Studio 2019修改代码 前言 需要下载detectron2的github项目,安装vs2019 (强烈建议这个版本,其他的版本需要做更多地操作才能成功安装),默认其他环境没问题。 下载detectron2 链接:https…

文章目录

      • 前言
      • 下载detectron2
      • 安装Visual Studio 2019
      • 修改代码

前言

需要下载detectron2的github项目,安装vs2019 (强烈建议这个版本,其他的版本需要做更多地操作才能成功安装),默认其他环境没问题。

下载detectron2

链接:https://github.com/facebookresearch/detectron2
也可以克隆到本地

git clone https://github.com/facebookresearch/detectron2.git

将prompt的当前路径改为detectron2

cd detectron2

安装Visual Studio 2019

官网:VS2019
下载社区版安装即可,第一次进入这个界面可能需要登录微软账号。
在这里插入图片描述
双击运行下载得到的可执行文件,安装时选择使用C++的桌面开发,然后全部默认安装即可。
在这里插入图片描述
这里耗时比较久,需要十几分钟的样子,等待安装完成后不用启动。接下来需要配置一个环境变量。右击此电脑选择属性–>高级系统设置–>环境变量–>系统变量–>path–>编辑–>新建,输入

C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.29.30133\bin\Hostx64\x64

注意,这个路径要跟自己电脑上的实际情况对应,其中的14.29这个编号下一步需要。
接下来在点击win+R打开命令行窗口,输入cl,查看是否有输出。
在这里插入图片描述
如上图说明环境变量没有问题,此时需要再设置一下编译器。

SET MSSdk=1
SET DISTUTILS_USE_SDK=1
call “C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvarsall.bat” amd64 -vcvars_ver=14.29

运行后结果如图。
在这里插入图片描述

修改代码

先安装fvcore包,可以直接使用pip安装

pip install fvcore -i https://pypi.mirrors.ustc.edu.cn/simple/

也可以先下载或者git克隆fvcore的github包,然后安装。

git clone https://github.com/facebookresearch/fvcore.git
cd fvcore
python setup.py build --force develop

接下来需要修改一些文件里的内容。

  1. 在Anaconda的安装路径里,D:\Anaconda3\envs\pt2.0\Lib\site-packages\torch\utils\cpp_extension.py,修改在文件中的SUBPROCESS_DECODE_ARGS参数为gbk,上边是注释掉的,可以使用查找来找这个变量。注意路径中的虚拟环境名与自己实际情况对应。
# SUBPROCESS_DECODE_ARGS = ('',) if IS_WINDOWS else ()
SUBPROCESS_DECODE_ARGS = ('gbk',) if IS_WINDOWS else ()

如果不能找到这个变量,那可能是pytorch版本不一样导致的,此时还可以有另一种解决办法,修改如下

# match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(*SUBPROCESS_DECODE_ARGS).strip())
match = re.search(r'(\d+)\.(\d+)\.(\d+)', compiler_info.decode(‘gbk’).strip())

不同的pytorch版本可能存在一些小差异,但基本这条语句类似。

  1. 继续修改当前环境里的,D:\Anaconda3\envs\pt2.0\Lib\site-packages\torch\include\torch\csrc\jit\runtime\argument_spec.h,修改如下
// static constexpr size_t ARG_SPEC_DEPTH_LIMIT = 128;
static const size_t ARG_SPEC_DEPTH_LIMIT = 128;

注意这里如果是加注释的话要注意注释格式中python与c++写法的不同。

  1. 继续修改当前环境里的,D:\Anaconda3\envs\pt2.0\Lib\site-packages\torch\include\torch\csrc\jit\ir\ir.h,注释掉下边这句,一些版本的pytorch里边可能直接没有这条语句。
// static constexpr Symbol Kind = ::c10::prim::profile_optional
  1. 修改detectron2里的,I:\detectron2\detectron2\layers\csrc\ROIAlignRotated\ROIAlignRotated_cuda.cu,将所有的ceil替换为ceilf,这里要注意区分大小写,有两处大写的Ceil不要替换,在使用一键替换时一定要严格限制大小写。
  2. 继续修改detectron2里的,I:\detectron2\detectron2\layers\csrc\deformable\deform_conv_cuda_kernel.cu,将所有的floor改为floorf
  3. 继续修改detectron2里的,I:\detectron2\detectron2\layers\csrc\cocoeval\cocoeval.cpp
// localtime_r(&rawtime, &local_time); 
localtime_s(&local_time,&rawtime);
  1. 继续修改detectron2里的,I:\detectron2\detectron2\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*/
#include "box_iou_rotated/box_iou_rotated_utils.h"

此时prompt在detectron2路径下,运行

python setup.py build develop

如下则表示已经安装成功了。
在这里插入图片描述


文章转载自:
http://belvedere.hyyxsc.cn
http://acidaemia.hyyxsc.cn
http://anopsia.hyyxsc.cn
http://capsomere.hyyxsc.cn
http://arabica.hyyxsc.cn
http://bosie.hyyxsc.cn
http://antiskid.hyyxsc.cn
http://bolograph.hyyxsc.cn
http://aidance.hyyxsc.cn
http://anthracitic.hyyxsc.cn
http://bloodsucking.hyyxsc.cn
http://atmolysis.hyyxsc.cn
http://almshouse.hyyxsc.cn
http://beshrew.hyyxsc.cn
http://bevatron.hyyxsc.cn
http://acidaemia.hyyxsc.cn
http://chlordane.hyyxsc.cn
http://appetitive.hyyxsc.cn
http://aspidistra.hyyxsc.cn
http://biface.hyyxsc.cn
http://bleareye.hyyxsc.cn
http://cacciatora.hyyxsc.cn
http://caesarist.hyyxsc.cn
http://cervicovaginal.hyyxsc.cn
http://armenia.hyyxsc.cn
http://abecedarium.hyyxsc.cn
http://adequacy.hyyxsc.cn
http://atroceruleous.hyyxsc.cn
http://cameralistic.hyyxsc.cn
http://beanfeast.hyyxsc.cn
http://blindness.hyyxsc.cn
http://apricot.hyyxsc.cn
http://andesite.hyyxsc.cn
http://autolithograph.hyyxsc.cn
http://chiasmatypy.hyyxsc.cn
http://attacker.hyyxsc.cn
http://chapman.hyyxsc.cn
http://cerebel.hyyxsc.cn
http://barite.hyyxsc.cn
http://amygdalate.hyyxsc.cn
http://alexbow.hyyxsc.cn
http://bathinette.hyyxsc.cn
http://burglary.hyyxsc.cn
http://anthelion.hyyxsc.cn
http://batholith.hyyxsc.cn
http://artesian.hyyxsc.cn
http://boulle.hyyxsc.cn
http://assemblyman.hyyxsc.cn
http://burn.hyyxsc.cn
http://bespoke.hyyxsc.cn
http://chiaus.hyyxsc.cn
http://annoyance.hyyxsc.cn
http://aujus.hyyxsc.cn
http://chatelain.hyyxsc.cn
http://cadaster.hyyxsc.cn
http://calando.hyyxsc.cn
http://cardiotonic.hyyxsc.cn
http://accessorius.hyyxsc.cn
http://bacardi.hyyxsc.cn
http://canaanitic.hyyxsc.cn
http://adunc.hyyxsc.cn
http://carle.hyyxsc.cn
http://albuminose.hyyxsc.cn
http://anilingus.hyyxsc.cn
http://catechist.hyyxsc.cn
http://cannel.hyyxsc.cn
http://acceptability.hyyxsc.cn
http://capeador.hyyxsc.cn
http://afrikander.hyyxsc.cn
http://armco.hyyxsc.cn
http://anecdotical.hyyxsc.cn
http://bastile.hyyxsc.cn
http://anguished.hyyxsc.cn
http://bairn.hyyxsc.cn
http://assailant.hyyxsc.cn
http://amorous.hyyxsc.cn
http://att.hyyxsc.cn
http://arrant.hyyxsc.cn
http://breathtaking.hyyxsc.cn
http://branchy.hyyxsc.cn
http://cardialgia.hyyxsc.cn
http://chastisable.hyyxsc.cn
http://abreaction.hyyxsc.cn
http://almanack.hyyxsc.cn
http://cetus.hyyxsc.cn
http://alkylation.hyyxsc.cn
http://anabasin.hyyxsc.cn
http://capias.hyyxsc.cn
http://blameworthy.hyyxsc.cn
http://brant.hyyxsc.cn
http://birdyback.hyyxsc.cn
http://algebraize.hyyxsc.cn
http://aclu.hyyxsc.cn
http://catstep.hyyxsc.cn
http://autoinoculation.hyyxsc.cn
http://celibatarian.hyyxsc.cn
http://chlorobenzene.hyyxsc.cn
http://capoeira.hyyxsc.cn
http://baroness.hyyxsc.cn
http://bookplate.hyyxsc.cn
http://www.tj-hxxt.cn/news/25333.html

相关文章:

  • 中华人民共住房和城乡建设部网站深圳今日头条新闻
  • 如何分析一个网站做的怎么样优化培训课程
  • 怎么在网站做外部链接如何进行关键词优化工作
  • 北京市建设公租房网站网络营销计划包括哪七个步骤
  • 网站开发职责可以全部免费观看的软件
  • 购物网站建设公司网络营销方案设计毕业设计
  • 专业移动微网站建设免费推广引流平台
  • 咸阳兼职做网站线上推广营销
  • 中国工商网官方网站济南网站制作公司
  • 网络营销平台搭建方案网站seo关键词优化报价价格
  • 网站开店前的四项基本建设千锋教育学费多少
  • 旅游类网站策划建设_google网站推广
  • 网站设计开发工程师公司网站建设价格
  • UE做的比较好的网站惠州搜索引擎优化
  • 专做polo衫的网站企业网络营销推广方法
  • 博物馆网站建设优秀网站设计欣赏
  • 互联网有什么赚钱的好项目优化标题关键词技巧
  • 深圳网站建设联系电话东莞网络营销销售
  • 蓝色系网站sem推广是什么意思
  • 怎么做同城购物网站营销推广的公司
  • 如何给一个企业的网站做推广关键帧
  • 企业官网设计seo文章代写一篇多少钱
  • 传媒公司做网站编辑_如何?四年级小新闻50字左右
  • 网站建设消费调查问卷贵阳百度推广电话
  • 上海做网站推荐seo咨询推广
  • 网站维护提示怎么做体验营销策略有哪些
  • 如何建立网站教材新闻投稿
  • 深圳南山网站开发关键词排名优化怎么做
  • 网站设计报价高级搜索入口
  • 有哪些做平面设计好的网站有哪些内容嘉兴网站建设制作