当前位置:网站首页>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)
边栏推荐
- ZYNQ移植uCOSIII
- 用tkinter做一个简单图形界面
- Tencent cloud webshell experience
- Alexnet experiment encounters: loss Nan, train ACC 0.100, test ACC 0.100
- mongodb客户端操作(MongoRepository)
- What is time
- C Primer Plus Chapter 14 (structure and other data forms)
- Configuring OSPF basic functions for Huawei devices
- Five different code similarity detection and the development trend of code similarity detection
- Basic information of mujoco
猜你喜欢

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

Article management system based on SSM framework

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

Basic information of mujoco

Part IV: STM32 interrupt control programming

城联优品入股浩柏国际进军国际资本市场,已完成第一步
![[C language] dynamic address book](/img/e7/ca1030a1099fe1f59f5d8dd722fdb7.jpg)
[C language] dynamic address book

Set (generic & list & Set & custom sort)

ZYNQ移植uCOSIII

筑梦数字时代,城链科技战略峰会西安站顺利落幕
随机推荐
If the college entrance examination goes well, I'm already graying out at the construction site at the moment
mongodb客户端操作(MongoRepository)
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
Distributed cache
Service asynchronous communication
C Primer Plus Chapter 14 (structure and other data forms)
Model-Free Prediction
Chapter II proxy and cookies of urllib Library
The printf function is realized through the serial port, and the serial port data reception is realized by interrupt
Deep understanding of distributed cache design
How to set encoding in idea
【YoloV5 6.0|6.1 部署 TensorRT到torchserve】环境搭建|模型转换|engine模型部署(详细的packet文件编写方法)
stm32F407-------DAC数模转换
What is time
Advanced learning of MySQL -- basics -- multi table query -- inner join
The way of intelligent operation and maintenance application, bid farewell to the crisis of enterprise digital transformation
【批处理DOS-CMD命令-汇总和小结】-字符串搜索、查找、筛选命令(find、findstr),Find和findstr的区别和辨析
Linear algebra of deep learning
Leetcode(547)——省份数量
Article management system based on SSM framework