当前位置:网站首页>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)
边栏推荐
- Levels - UE5中的暴雨效果
- What kind of experience is it to realize real-time collaboration in jupyter
- build. How to configure the dependent version number in the gradle file
- 随时随地查看远程试验数据与记录——IPEhub2与IPEmotion APP
- Deep learning environment configuration jupyter notebook
- pyflink的安装和测试
- 省市区三级坐标边界数据csv转JSON
- Telerik UI 2022 R2 SP1 Retail-Not Crack
- Part IV: STM32 interrupt control programming
- stm32F407-------SPI通信
猜你喜欢
If the college entrance examination goes well, I'm already graying out at the construction site at the moment
Stm32f407 ------- SPI communication
How to set encoding in idea
[yolov5 6.0 | 6.1 deploy tensorrt to torch serve] environment construction | model transformation | engine model deployment (detailed packet file writing method)
深入探索编译插桩技术(四、ASM 探秘)
Attention SLAM:一种从人类注意中学习的视觉单目SLAM
How to judge whether an element in an array contains all attribute values of an object
【批處理DOS-CMD命令-匯總和小結】-字符串搜索、查找、篩選命令(find、findstr),Find和findstr的區別和辨析
学习光线跟踪一样的自3D表征Ego3RT
alexnet实验偶遇:loss nan, train acc 0.100, test acc 0.100情况
随机推荐
What kind of experience is it to realize real-time collaboration in jupyter
Article management system based on SSM framework
城联优品入股浩柏国际进军国际资本市场,已完成第一步
Attention SLAM:一種從人類注意中學習的視覺單目SLAM
Lombok 同时使⽤ @Data 和 @Builder 的坑,你中招没?
pyflink的安装和测试
[daily problem insight] prefix and -- count the number of fertile pyramids in the farm
OSPF configuration command of Huawei equipment
How do novices get started and learn PostgreSQL?
How to judge whether an element in an array contains all attribute values of an object
windows安装mysql8(5分钟)
build. How to configure the dependent version number in the gradle file
Chapter II proxy and cookies of urllib Library
Advanced learning of MySQL -- basics -- multi table query -- external connection
Advanced learning of MySQL -- Fundamentals -- four characteristics of transactions
深度学习之线性代数
Five different code similarity detection and the development trend of code similarity detection
通过串口实现printf函数,中断实现串口数据接收
Stm32f407 ------- SPI communication
Interface master v3.9, API low code development tool, build your interface service platform immediately