当前位置:网站首页>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)
边栏推荐
- 第六篇,STM32脉冲宽度调制(PWM)编程
- 代码克隆的优缺点
- Article management system based on SSM framework
- Levels - UE5中的暴雨效果
- The way of intelligent operation and maintenance application, bid farewell to the crisis of enterprise digital transformation
- 重上吹麻滩——段芝堂创始人翟立冬游记
- Threejs image deformation enlarge full screen animation JS special effect
- Equals() and hashcode()
- 深度学习框架TF安装
- STM32开发资料链接分享
猜你喜欢

Learn self 3D representation like ray tracing ego3rt

5种不同的代码相似性检测,以及代码相似性检测的发展趋势

Deep understanding of distributed cache design

深度学习之环境配置 jupyter notebook

How to set encoding in idea

stm32F407-------SPI通信

城联优品入股浩柏国际进军国际资本市场,已完成第一步

第六篇,STM32脉冲宽度调制(PWM)编程
![[Niuke classic question 01] bit operation](/img/f7/e3a482c379ec9bbdb453a05e5e08cb.jpg)
[Niuke classic question 01] bit operation
![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](/img/87/3fee9e6f687b0c3efe7208a25f07f1.png)
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
随机推荐
城联优品入股浩柏国际进军国际资本市场,已完成第一步
Mujoco second order simple pendulum modeling and control
C9高校,博士生一作发Nature!
Hero League | King | cross the line of fire BGM AI score competition sharing
[daily problem insight] prefix and -- count the number of fertile pyramids in the farm
【JokerのZYNQ7020】AXI_ EMC。
【YoloV5 6.0|6.1 部署 TensorRT到torchserve】环境搭建|模型转换|engine模型部署(详细的packet文件编写方法)
Three methods to realize JS asynchronous loading
Configuring the stub area of OSPF for Huawei devices
接口(接口相关含义,区别抽象类,接口回调)
筑梦数字时代,城链科技战略峰会西安站顺利落幕
C9 colleges and universities, doctoral students make a statement of nature!
Chapter 5 DML data operation
Attention slam: a visual monocular slam that learns from human attention
什么是时间
How to set encoding in idea
详解OpenCV的矩阵规范化函数normalize()【范围化矩阵的范数或值范围(归一化处理)】,并附NORM_MINMAX情况下的示例代码
Learn to use code to generate beautiful interface documents!!!
Dell笔记本周期性闪屏故障
[Niuke classic question 01] bit operation