当前位置:网站首页>tensorflow 1.14指定gpu运行设置
tensorflow 1.14指定gpu运行设置
2022-07-06 17:10:00 【愚昧之山绝望之谷开悟之坡】
注意:allow_soft_placement=True表明:计算设备可自行选择,如果没有这个参数,会报错。
因为不是所有的操作都可以被放在GPU上,如果强行将无法放在GPU上的操作指定到GPU上,将会报错。
os.environ["CUDA_DEVICE_ORDER"] = "PCI_BUS_ID"
os.environ["CUDA_VISIBLE_DEVICES"] = "0" # 这里是gpu的序号,指定使用的gpu对象
gpu_options = tf.GPUOptions()
gpu_options.allow_growth = True
config_photo = tf.ConfigProto(allow_soft_placement=True, gpu_options=gpu_options, log_device_placement=True)
self.sess = tf.Session(config=config_photo)
边栏推荐
- Stm32f407 ------- DAC digital to analog conversion
- AI超清修复出黄家驹眼里的光、LeCun大佬《深度学习》课程生还报告、绝美画作只需一行代码、AI最新论文 | ShowMeAI资讯日报 #07.06
- Explain in detail the matrix normalization function normalize() of OpenCV [norm or value range of the scoped matrix (normalization)], and attach norm_ Example code in the case of minmax
- ActiveReportsJS 3.1中文版|||ActiveReportsJS 3.1英文版
- Advanced learning of MySQL -- basics -- basic operation of transactions
- Quaternion attitude calculation of madgwick
- Threejs image deformation enlarge full screen animation JS special effect
- How to set encoding in idea
- A brief history of deep learning (I)
- Trace tool for MySQL further implementation plan
猜你喜欢

Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100
![[yolov5 6.0 | 6.1 deploy tensorrt to torch serve] environment construction | model transformation | engine model deployment (detailed packet file writing method)](/img/1a/2b497a1baa04d84d28da715d097dfe.png)
[yolov5 6.0 | 6.1 deploy tensorrt to torch serve] environment construction | model transformation | engine model deployment (detailed packet file writing method)

Dell笔记本周期性闪屏故障

Data processing of deep learning
![[C language] dynamic address book](/img/e7/ca1030a1099fe1f59f5d8dd722fdb7.jpg)
[C language] dynamic address book

第七篇,STM32串口通信编程

AI super clear repair resurfaces the light in Huang Jiaju's eyes, Lecun boss's "deep learning" course survival report, beautiful paintings only need one line of code, AI's latest paper | showmeai info

windows安装mysql8(5分钟)
![[user defined type] structure, union, enumeration](/img/a5/d6bcfb128ff6c64f9d18ac4c209210.jpg)
[user defined type] structure, union, enumeration

Zynq transplant ucosiii
随机推荐
Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100
The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
Data processing of deep learning
Address information parsing in one line of code
【批处理DOS-CMD命令-汇总和小结】-查看或修改文件属性(ATTRIB),查看、修改文件关联类型(assoc、ftype)
[Niuke classic question 01] bit operation
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
How to get started and improve test development?
OSPF configuration command of Huawei equipment
Explain in detail the implementation of call, apply and bind in JS (source code implementation)
What is time
第七篇,STM32串口通信编程
Lombok 同时使⽤ @Data 和 @Builder 的坑,你中招没?
Data analysis course notes (III) array shape and calculation, numpy storage / reading data, indexing, slicing and splicing
Idea automatically imports and deletes package settings
View remote test data and records anytime, anywhere -- ipehub2 and ipemotion app
【软件逆向-求解flag】内存获取、逆变换操作、线性变换、约束求解
Configuring the stub area of OSPF for Huawei devices
浅谈测试开发怎么入门,如何提升?
Interface master v3.9, API low code development tool, build your interface service platform immediately