当前位置:网站首页>pycharm上的tensorflow环境搭载
pycharm上的tensorflow环境搭载
2022-07-30 05:06:00 【看星河的兔子】
当在Anaconda Prompt上可以运行出以下结果时,代表你的tensorflow已经安装成功了(如果想知道如何可以让tensorflow安装成功,可以在评论区评论,我再出一期tensorflow-cpu的安装方法)
那如何在pycharm中直接使用tensorflow的环境呢
我们新建一个project
然后选择settings
点击小齿轮,点击add
选择conda environment!!!
选择existing environment
因为我这个环境是已经配置好的,所以没有显示东西,但如果你没有配置好,在这里选择你已经安装好的tensorflow的环境就好了。
再让我们测试一下
import tensorflow as tf
#创建一个Tensor字符串常量
hello = tf.constant("hello world ")
print(hello.numpy())

发现无错误但有警告,此时我们加入一段代码把警告消除即可。
(AVX(Advanced Vector Extensions-Intel AVX) 是intel 优化CPU用于浮点计算的技术,如果有GPU了,其实不用考虑该警告讯息。 如果不愿意看到该警告讯息, 可以加上如下2行代码)
import tensorflow as tf
import os
##加入忽略
os.environ['TF_CPP_MIN_LOG_LEVEL']='2'
#创建一个Tensor字符串常量
hello = tf.constant("hello world ")
print(hello.numpy())

这样警告就消除了。
边栏推荐
- Image stitching (registration) case based on OpenCV
- POJ1321 chessboard problem (detailed explanation)
- 三、依赖配置管理
- LeetCode Algorithm 2326. Spiral Matrix IV
- DLL description (1)
- Unity stepping on the pit record - the use of GetComponent
- The Azure developer news 丨 memorabilia in July
- (Hexagon_V65_Programmers_Reference_Manual(13)
- Perspective transformation matrix of image perspective correction should be matrix (single)/findHomography with getPerspectiveTransformd difference
- POJ1321 棋盘问题(详解)
猜你喜欢

Unity3D Application simulation enters the front and background and pauses

Acwing完全数

Record of problems encountered by the pyinstaller packager

Discourse 自定义头部链接(Custom Header Links)

Excellent MySQL interview questions, 99% must ask in preparation for August!I can't pass the interview

Hexagon_V65_Programmers_Reference_Manual (12)

GO language study notes one

Dynamic Programming Problems (End)

Using the GPU parallel computing 】 【 OpenCL&OpenCLUtilty GPU parallel computing

Recursive Optimization of Fibonacci Sequences "Memo Recursion"
随机推荐
涂鸦Wi-Fi&BLE SoC开发幻彩灯带
L2-025 分而治之
Learning of redis_Basic part
C. Qualification Rounds
模拟问题(上)
Divide and conquer. L2-025
Hexagon_V65_Programmers_Reference_Manual(10)
Discourse Custom Header Links
Six, read application configuration + log configuration
IGBT wafers used in photovoltaic inverters
Excellent MySQL interview questions, 99% must ask in preparation for August!I can't pass the interview
1. Get data - requests.get()
模拟问题(下)
GO language study notes one
Discourse 自定义头部链接(Custom Header Links)
std::vector中保存指针时用法
[Verilog] HDLBits Problem Solution - Circuits/Combinational Logic
js operation to add or subtract from the current date (day, week, month, year)
String problem (below)
复现XXL-JOB 任务调度中心后台任意命令执行漏洞