当前位置:网站首页>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)
边栏推荐
- equals()与hashCode()
- Chapter 5 DML data operation
- STM32开发资料链接分享
- Advanced learning of MySQL -- basics -- multi table query -- external connection
- Attention SLAM:一種從人類注意中學習的視覺單目SLAM
- 学习光线跟踪一样的自3D表征Ego3RT
- 第六篇,STM32脉冲宽度调制(PWM)编程
- . Bytecode structure of class file
- How to get started and improve test development?
- 【软件逆向-求解flag】内存获取、逆变换操作、线性变换、约束求解
猜你喜欢

Attention SLAM:一種從人類注意中學習的視覺單目SLAM

Win10 startup error, press F9 to enter how to repair?

pyflink的安装和测试

Configuring OSPF basic functions for Huawei devices

C9 colleges and universities, doctoral students make a statement of nature!

第七篇,STM32串口通信编程

Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100

Dr selection of OSPF configuration for Huawei devices

How to judge whether an element in an array contains all attribute values of an object

Threejs image deformation enlarge full screen animation JS special effect
随机推荐
英雄联盟|王者|穿越火线 bgm AI配乐大赛分享
Data analysis course notes (III) array shape and calculation, numpy storage / reading data, indexing, slicing and splicing
Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100
代码克隆的优缺点
stm32F407-------DAC数模转换
How to get started and improve test development?
【JokerのZYNQ7020】AXI_EMC。
第七篇,STM32串口通信编程
Hero League | King | cross the line of fire BGM AI score competition sharing
A brief history of deep learning (I)
Web project com mysql. cj. jdbc. Driver and com mysql. jdbc. Driver differences
Attention SLAM:一種從人類注意中學習的視覺單目SLAM
Stm32f407 ------- SPI communication
Telerik UI 2022 R2 SP1 Retail-Not Crack
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
批量获取中国所有行政区域经边界纬度坐标(到县区级别)
What kind of experience is it to realize real-time collaboration in jupyter
If the college entrance examination goes well, I'm already graying out at the construction site at the moment
学习光线跟踪一样的自3D表征Ego3RT
深度学习之环境配置 jupyter notebook