【备忘】Fastdeploy编译中遇到nvcc fatal : Unsupported gpu architecture ‘compute_35‘的解决

解决nvcc fatal : Unsupported gpu architecture ‘compute_30‘在darknet的编译中的问题 解决nvcc fatal : Unsupported gpu architecture 'compute_30'在darknet的编译中的问题 阅读详情
AI摘要

文章讲述了在使用FastDeploy时遇到的编译错误,涉及CUDA不支持compute_35架构的问题,解决方案是修改FastDeploy的cuda.cmake文件,移除不兼容的GPU架构设置。

Fastdeploy编译中遇到nvcc fatal : Unsupported gpu architecture ‘compute_35‘的解决

背景

使用Paddle的Fastdeploy,安装过程中需要对C++ SDK进行编译,编译过程中报标题所述的错误。后来在github上找到了解决办法。

环境

  • GPU: RTX3060Ti
  • Ubuntu 2204
  • cuda 12.1.1
  • TensorRT-8.6.1.6
  • opencv 4.7
  • Fastdeploy develop,commit id = cd0ee79c91d4ed1103abdc65ff12ccadd23d0827

复现路径

  1. 安装cuda-12.1.1(官网下载步骤及链接)
  2. 安装opencv, 到github官网git clone下来,手动编译,资料csdn很多就不贴了。
  3. 安装TensorRT。按照Paddle官网要求,CUDA 工具包 12.0 配合 cuDNN v8.9.1, 如需使用 PaddleTensorRT 推理,需配合 TensorRT8.6.1.6(官网链接提供了,tar包的,解压后设置一下路径就可以了,但下载需要nvidia developer帐号登录,免费注册)
  4. 安装FastDeploy,我按照的是这个教程,其中以下cmake选项有几处问题需要手动修改。
git clone https://github.com/PaddlePaddle/FastDeploy.git
cd FastDeploy
mkdir build && cd build
cmake .. -DENABLE_ORT_BACKEND=ON \
         -DENABLE_PADDLE_BACKEND=ON \
         -DENABLE_OPENVINO_BACKEND=ON \
         -DENABLE_TRT_BACKEND=ON \
         -DWITH_GPU=ON \
         -DTRT_DIRECTORY=/Paddle/TensorRT-8.4.1.5 \  # TensorRT的路径要根据你刚才解压的Tar包进行修改
         -DCUDA_DIRECTORY=/usr/local/cuda \
         -DCMAKE_INSTALL_PREFIX=${PWD}/compiled_fastdeploy_sdk \
         -DENABLE_VISION=ON \
         -DOPENCV_DIRECTORY=/usr/lib/x86_64-linux-gnu/cmake/opencv4 \  # 如果你是源码编译再make install的话,就不用改
         -DENABLE_TEXT=ON
make -j12
make install
  • 注意点1 cmake的选项需要调整,具体见上面。
  • 注意点2,个人认为就是Fastdeploy的问题,问题如下,留意那一堆的nvcc fatal。其中的compute_35其实就是老的计算架构SM_35,我的显卡是SM_86,不应该出现此问题。
make -j16
[  3%] Built target extern_onnxruntime
[  6%] Built target extern_paddle_inference
[  8%] Built target extern_fast_tokenizer
[ 10%] Built target extern_paddle2onnx
[ 21%] Built target yaml-cpp
[ 21%] Built target yaml-cpp-parse
[ 22%] Built target yaml-cpp-read
[ 23%] Built target yaml-cpp-sandbox
Consolidate compiler generated dependencies of target fastdeploy
[ 23%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/common/cuda/adaptive_pool2d_kernel.cu.o
[ 23%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/function/cuda_cast.cu.o
[ 23%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/grid_sample_3d.cu.o
[ 24%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/voxelize_op.cu.o
[ 24%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/iou3d_nms_kernel.cu.o
[ 25%] Building CUDA object CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/centerpoint_postprocess_op.cu.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/contrib/yolov5cls/preprocessor.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/contrib/resnet.cc.o
[ 25%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/contrib/yolov5cls/yolov5cls.cc.o
[ 26%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppcls/model.cc.o
[ 26%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppcls/postprocessor.cc.o
[ 26%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppcls/preprocessor.cc.o
[ 27%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppshitu/ppshituv2_rec_postprocessor.cc.o
[ 28%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppshitu/ppshituv2_rec.cc.o
[ 28%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/contrib/yolov5cls/postprocessor.cc.o
nvcc fatal   : Unsupported gpu architecture 'compute_35'
nvcc fatal   : Unsupported gpu architecture 'compute_35'
nvcc fatal   : Unsupported gpu architecture 'compute_35'
nvcc fatal   : Unsupported gpu architecture 'compute_35'
nvcc fatal   : Unsupported gpu architecture 'compute_35'
[ 28%] Building CXX object CMakeFiles/fastdeploy.dir/fastdeploy/vision/classification/ppshitu/ppshituv2_rec_preprocessor.cc.o
nvcc fatal   : Unsupported gpu architecture 'compute_35'
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:496:CMakeFiles/fastdeploy.dir/fastdeploy/function/cuda_cast.cu.o] 错误 1
make[2]: *** 正在等待未完成的任务....
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:510:CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/common/cuda/adaptive_pool2d_kernel.cu.o] 错误 1
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:706:CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/grid_sample_3d.cu.o] 错误 1
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:734:CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/voxelize_op.cu.o] 错误 1
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:720:CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/iou3d_nms_kernel.cu.o] 错误 1
make[2]: *** [CMakeFiles/fastdeploy.dir/build.make:692:CMakeFiles/fastdeploy.dir/fastdeploy/runtime/backends/paddle/ops/centerpoint_postprocess_op.cu.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:310:CMakeFiles/fastdeploy.dir/all] 错误 2
make: *** [Makefile:156:all] 错误 2

问题的解决

解决的方法也很简单,修改FastDeploy/cmake/cuda.cmake文件即可。

if(NOT WITH_GPU)
  return()
endif()

# This is to eliminate the CMP0104 warnings from cmake 3.18+.
# Instead of setting CUDA_ARCHITECTURES, we will set CMAKE_CUDA_FLAGS.
set(CMAKE_CUDA_ARCHITECTURES OFF)

if(BUILD_ON_JETSON)
  set(fd_known_gpu_archs "53 62 72")
  set(fd_known_gpu_archs10 "53 62 72")
else()
  message("Using New Release Strategy - All Arches Packge")
#  set(fd_known_gpu_archs "35 50 52 60 61 70 75 80 86") #原来
#  set(fd_known_gpu_archs10 "35 50 52 60 61 70 75")		#原来

  set(fd_known_gpu_archs "50 52 60 61 70 75 80 86")  #修改
  set(fd_known_gpu_archs10 "50 52 60 61 70 75")		 #修改

  set(fd_known_gpu_archs11 "50 60 61 70 75 80")
endif()

######################################################################################
# A function for automatic detection of GPUs installed  (if autodetection is enabled)
# Usage:
#   detect_installed_gpus(out_variable)

文件开头包含 “fd_known_gpu_archs” 和 “fd_known_gpu_archs10” 两个地方,删除35后,make即可通过。

[100%] Linking CUDA device code CMakeFiles/fastdeploy.dir/cmake_device_link.o
[100%] Linking CXX shared library libfastdeploy.so
[100%] Built target fastdeploy
[100%] Built target patchelf_paddle_inference
nvcc fatal : Unsupported gpu architecture ‘compute_20‘ CMake Error at pcl_gpu_utils_generated_repack 因为在安装pcl1 .8前安装了cuda9.0后出现了以下报错。(之前用另外一台没有cuda的环境下安装可以编译通过) 主要错误摘录: nvcc fatal : Unsupported gpu architecture ‘compute_20’ CMake Error at pcl_gpu_utils_generated_repacks.cu.o.cmake:209 (message): Error generating Unsupported gpu architecture ‘compute_20’ C 阅读详情

相关推荐

问题解决:nvcc fatal : Unsupported gpu architecture ‘compute_75‘

问题解决:nvcc fatal : Unsupported gpu architecture 'compute_75'前言问题描述问题分析问题解决参考 前言 问题描述 问题分析 问题解决 参考

Kobaayyy的博客 1万+

[CUDNN]nvcc fatal : Unsupported gpu architecture ‘compute_35‘ make: *** [Makefile:241: fp16_dev.o]

【代码】[CUDNN]nvcc fatal : Unsupported gpu architecture ‘compute_35‘ make: *** [Makefile:241: fp16_dev.o]

没有最好,只有更好 1954

数字取证双雄:Passware Kit Forensic 与 ElcomSoft 在实战场景下的能力边界解析

本文深入解析了Passware Kit Forensic与ElcomSoft在数字取证实战中的能力边界,涵盖Windows、macOS、iOS和Android系统的密码恢复与数据提取技术。通过真实案例对比两款工具在硬件加速、分布式计算及云取证等场景下的表现差异,为取证专家提供关键决策参考。特别探讨了密码恢复软件在加密设备突破中的核心作用。

weixin_30342209的博客 398

nvcc fatal : Unsupported gpu architecture ‘compute_‘

我是编译darknet ros时遇到的,错误原因是显卡算力不对应 在CMakeList中有如下: set( CUDA_NVCC_FLAGS ${CUDA_NVCC_FLAGS}; -O3 -gencode arch=compute_30,code=sm_30 -gencode arch=compute_35,code=sm_35 -gencode arch=compute_50,code=[sm_50,compute_50] -gencode ar

不知语冰 5573

功率半导体器件选型指南:从GTO、GTR到MOSFET、IGBT的原理与应用

功率半导体器件是电力电子系统的核心,如同电路中的智能开关,负责电能的转换与控制。其工作原理基于半导体材料的导电特性,通过控制信号精确管理电路的通断。这类器件的技术价值在于提升能效、减小体积并增强系统可靠性,广泛应用于变频器、逆变器、开关电源及新能源领域。理解不同器件如MOSFET的雪崩能量与IGBT的损耗计算,是进行高效、可靠电路设计的基础。本文聚焦于GTO、GTR、MOSFET和IGBT这四类经典全控型器件的特性对比与选型策略,帮助工程师在具体项目中做出经济可靠的选择。

cumo7370的博客 447

数据驱动的老年人健康管理与生活品质提升实践研究

摘要 全球人口老龄化趋势显著,2025年65岁以上人口预计达8.57亿,中国老年人口已突破3亿。老年人健康挑战突出,75%以上患慢性病,且独居老人心理健康与应急需求迫切。数据驱动的健康管理通过智能设备(如跌倒检测、远程监测)和AI技术(如疾病预测算法)提升效率,改善生活品质。研究提出差异化需求解决方案,如慢性病患者的持续监测与用药管理,高龄老人的综合护理服务,并探讨政策与商业模式以推动智慧养老产业发展,2024年市场规模已达6.8万亿元。

聚焦程序设计语言理论与前沿技术落地,拆解代码世界的底层逻辑,探索语言设计的 “创造与沟通” 之道。从编译原理、类型系统到 AI 技术在金融、医疗、制造、养老、大健康等领域的实战案例,分享硬核技术干货与工程化思考。 1630

讲解Unsupported gpu architecture ‘compute_*‘2017解决方法

在使用2017年以前的NVIDIA GPU进行深度学习训练时,经常会遇到"Unsupported GPU Architecture 'compute_*'"的错误。本篇文章将介绍该错误的原因并提供解决方法。

牛肉胡辣汤 858

Java零基础之多线程篇:线程间如何通信?

随着计算机技术的发展,多线程编程已经成为现代软件开发中的一个重要方向。在多线程编程中,线程间的通信是一个非常关键的问题。在Java开发语言中,Java提供了一些机制来实现线程间的通信,帮助开发者协调不同线程之间的执行顺序和数据交换。本文将介绍Java多线程编程中的线程间通信的相关知识。首先,我们将从简介开始,介绍线程间通信的基本概念和原理。然后,我们将通过源代码解析的方式,深入探讨Java中实现线程间通信的方法。接着,我们将给出一些应用场景案例,展示线程间通信在实际开发中的应用。

喵手的博客 1557

Caffe GPU编译报nvcc fatal : Unsupported gpu architecture 'compute_**' 错误解决方法

在cuda安装成功,配置好cudnn的条件下,编译Caffe GPU时生成工程时会报nvcc fatal : Unsupported gpu architecture 'compute_**' 错误,解决办法两步: 1、.修改nvcc.hpp文件,注释最后三行。 2、 修改caffe-windows/Cuda.camke,将第7行 修改为set(caffe_known_gpu_archs "6...

joyjoy01的博客 7273

LoveSQL

LoveSQL(SQL注入详解) 1、根据题目,显然想到的是sql注入漏洞,直接尝试万能密码 2、此时url构造,查看字段数 /check.php?username=admin' order by 3%23&password=1 # 存在 /check.php?username=admin' order by 4%23&password=1 # 报错 因此,得到总共有三个字段数 注意:url中不能用#,应该用url编码%23 3、用union来查询测试注入点,查看回显点

lunan的博客 1562

飞塔CVE-2022-40684复现

admin 无密码直接回车(会提示修改密码)

G3et的博客 1145

nvcc fatal : Value ‘compute_35‘ is not defined for option ‘gpu-architecture‘

nvcc fatal : Value ‘compute_35‘ is not defined for option ‘gpu-architecture‘

weixin_45973213的博客 1560

远程声控系统(MATLAB代码见优快云资源)

远程声控系统技术报告 一、题目要求 实现一个远程声音控制系统。首先采集不同的语音指示信号,进行适当压缩;然后通过噪声信道实现远程传输,远端接收后再通过适当计算识别出是何指示,最后送入一个处于未知状态、但能控/能观的控制系统,完成不同的控制动作。 二、问题分解与解决思路 2.1 系统设计 实验中以汉语数字语音1~9作为指令,数字语音“1”代表一号指令,数字语音“2”代表二号指令,依次类推。发送端发出语音“1”,发送端对应的数字语音文件为“1b.wav”,通过信源编码对语音进行压缩编码,然后进行信道编码并进行基

业精于勤,荒于嬉 5733

nvcc fatal : Unsupported gpu architecture ‘compute_86‘ CMake Error at Memory_Transfer_generated_me

nvcc fatal : Unsupported gpu architecture 'compute_86' CMake Error at Memory_Transfer_generated_me

ZhengrongYue的博客 3433

【WRF安装】完整自动化 WRF-ARW/WRF-Chem 安装脚本(多服务器测试)

【WRF安装】完整自动化 WRF-ARW/WRF-Chem 安装脚本(多服务器测试)

WW、forever的博客 283

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

【问题解决】安装PCL报错:nvcc fatal : Unsupported gpu architecture ‘compute_30‘

问题描述 显卡:NVIDIA GeForce RTX 3060 CUDA版本:CUDA 11.2 PCL版本:1.10.1 make过程中出现:nvcc fatal : Unsupported gpu architecture ‘compute_30‘ 报错。 问题分析 症结在于我的显卡不支持compute_30的GPU构架,与CUDA版本不兼容。 网上大多数的解决方法是找到makefile文件中CUDA_ARCH参数配置,将其中的 -gencode arch=compute_30,code=sm_30

qq_42751676的博客 1万+

假人有限元模型

假人模型,车辆碰撞假人有限元模型,适合做乘员安全的研究者利用

ubuntu20.0.4安装opencv4.2.0和opencv_contrib-4.2.0并支持CUDA,Geforce RTX 3060显卡,算力8.6

ubuntu20.0.4安装opencv4.2.0和opencv_contrib-4.2.0并支持CUDA,Geforce RTX 3060显卡,算力8.6

u013454780的博客 9789

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

计算机控制技术及应用

《计算机控制技术及应用》通过总结作者的科研成果和吸收国内外的先进理论、方法和技术,以计算机控制系统的网络化、开放化、智能化和集成化发展趋势为主线索,主要介绍计算机控制系统的基本概念和计算机控制系统的典型形式,计算机控制系统的数学描述与基本分析方法,以及数字PID控制器、最少拍控制系统、达林算法、状态变量设计法等设计方法及其各种改进算法。重点突出计算机控制系统输入输出通道接口的设计方法和典型控制系统的设计案例与实现方法等。

vs2019报错nvcc fatal : Unsupported gpu architecture ‘compute_30‘ error MSB3721:

本人使用的是GTX 1050Ti, cuda 11.0,opencv3.4,vs2019 编译darknet: 解决方法: 右击项目–>属性–>CUDA C/C++ -->Device 修改Code Generation为:compute_35,sm_35 如果不同型号的显卡的小伙伴可以试着尝试更改为darknet/Makefile 21行之后的几个算力参数 ...

weixin_43997864的博客 6022

解决问题使用nvcc fatal : Unsupported gpu architecture ‘compute_75‘

如果发现当前的 CUDA 版本不支持你的 GPU 架构,那么你需要更新 CUDA 到一个支持你的 GPU 架构的版本。首先,你需要卸载当前的 CUDA 版本。不同版本的 CUDA 支持不同的 GPU 架构,如果 GPU 架构超出了 CUDA 版本的支持范围,就会出现这个错误。然后,你可以查阅 NVIDIA 官方文档,找到该版本所支持的 GPU 架构,并确认你的 GPU 是否在支持列表中。请注意,这种做法可能会导致生成的代码不能充分利用 GPU 的性能和特性,因为它们是为支持的 GPU 架构进行了优化的。

牛肉胡辣汤 3095

RuntimeError: Error compiling objects for extension 和nvcc fatal : Unsupported gpu architecture ‘c

记录一下最近跑TinaFace代码在原来服务器跑没有问题,新服务器跑遇到的错误 首先,按照官网步骤安装相关包: 本人环境: 显卡驱动版本: NVIDIA-SMI 460.73.01 Driver Version: 460.106.00 CUDA Version: 11.2 CUDA版本:nvcc -V: Cuda compilation tools, release 11.1, V11.1.74 pytorch 1.8.1 torchvision

weixin_44777827的博客 1万+

Unsupported gpu architecture 'compute_*'2017解决方法

Unsupported gpu architecture 'compute_*'2017解决方法

jacke121的专栏 1万+

报错解决:RuntimeError: Error compiling objects for extension和nvcc fatal: Unsupported gpu architecture

报错解决:RuntimeError: Error compiling objects for extension和nvcc fatal: Unsupported gpu architecture

博学而笃志,切问而近思。 2万+

caffe编译过程中的错误: nvcc fatal : Unsupported gpu architecture ‘compute_20‘

在编译caffe的过程中遇到了nvcc fatal : Unsupported gpu architecture 'compute_20'这个错误, 修改方法为: 在Makefile.config文件中根据自己CUDA的版本注释不同的行。# CUDA architecture setting: going with all of them.# For CUDA < 6.0, com...

C/C++、嵌入式开发、深度学习算法、模型部署与推理优化 2166

darknet_ros编译时出现nvcc fatal : Unsupported gpu architecture ‘compute_30‘

今天在ros中编译包的时候出现下图的错误。

wtlll的博客 751

nvcc fatal : Unsupported gpu architecture ‘compute_30‘

nvcc fatal : Unsupported gpu architecture 'compute_30'

weixin_46028606的博客 503

opencv编译时警告vncc warning: The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’, ‘sm_37’ and ‘sm_50’

opencv编译时警告vncc warning: The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_35’, ‘sm_37’ and ‘sm_50’ architectures are deprecated, and may be removed in a future release 在用make编译opencv的时候出现警告: vncc warning: The ‘compute_35’, ‘compute_37’, ‘compute_50’, ‘sm_

qq_51182466的博客 5620
上一篇: Ubuntu20.04升级22.04失败解决
下一篇: 【备忘】CogVLM2环境搭建1 —— 基础环境
LateLinux
博客等级 码龄18年 65粉丝 25原创
评论 1
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值