Tensorflow小技巧01:检测本地Tensorflow的版本

前言:

以Pycharm为例,Windwos10系统,检测本地环境的Tensorflow的版本:


1 打开Pycharm窗口

2 在窗口中输入:

复制代码
python

Python 3.9.5 (tags/v3.9.5:0a7dcbd, May 3 2021, 17:27:52) MSC v.1928 64 bit (AMD64) on win32

Type "help", "copyright", "credits" or "license" for more information.

3 引入tensorflow:

复制代码
>>> import tensorflow as tf

2024-04-18 09:53:56.814702: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.

2024-04-18 09:53:58.376064: I tensorflow/core/util/port.cc:113] oneDNN custom operations are on. You may see slightly different numerical results due to floating-point round-off errors from different computation orders. To turn them off, set the environment variable `TF_ENABLE_ONEDNN_OPTS=0`.

4 输入版本查询:

复制代码
>>> tf.__version__   

笔者的版本:

'2.16.1'

相关推荐
米小虾8 分钟前
2026年AI Agent全面爆发:从开源生态到企业级应用的进化之路
人工智能·agent
用户69190268133927 分钟前
Vibe Coding 开发项目的基本范式
人工智能·设计模式·代码规范
To_OC31 分钟前
别再跟 AI 死磕 prompt 了,我写了个 Loop 让它自己改到满意为止
人工智能·aigc·agent
血小溅1 小时前
三大 AI 编码框架深度对比:GSD vs OpenSpec vs Superpowers
人工智能·后端
武子康4 小时前
调查研究-186 LangChain 和 LangGraph 的区别:从快速构建 Agent 到生产级工作流编排
人工智能·langchain·llm
武子康5 小时前
调查研究-185 CodeGraph 调研:给 AI 编程 Agent 一张代码库地图,少一点反复 grep(2026)
人工智能·openai·claude
aqi006 小时前
15天学会AI应用开发(八)使用向量数据库实现RAG功能
人工智能·python·大模型·ai编程·ai应用
Csvn6 小时前
`functools.lru_cache` —— 一行代码搞定缓存加速
后端·python
混沌福王7 小时前
Electron三端统一架构:运行时Adapter、IPC能力边界与分层设计
人工智能·agent·ai编程