Tensorflow 安装和测试(Anaconda4.7.10+windows10)
一. 软件下载
二. 配置相关
1. 修改 Jupyter notebook 默认工作路径
(1)打开 Anaconda Prompt ,输入 jupyter notebook --generate-config,打开文件 C:\Users\xxx\.jupyter\jupyter_notebook_config.py ,修改 c.NotebookApp.notebook_dir = 'G:\StudyFiles\PythonProjects'
(2)修改快捷方式的启动路径
2. 配置conda镜像源(参考 https://blog.csdn.net/Sagepyt/article/details/100740862 )
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/msys2/
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge
conda config --add channels https://mirrors.tuna.tsinghua.edu.cn/anaconda/pkgs/free/
conda config --set show_channel_urls yes
3. conda常用的命令
1)conda list 查看安装了哪些包。
2)conda env list 或 conda info -e 查看当前存在哪些虚拟环境
3)conda update conda 检查更新当前conda
4.创建python虚拟环境
conda create -n your_env_name python=X.X
5.删除虚拟环境
conda remove -n your_env_name(虚拟环境名称) --all
6.删除环境中的某个包
conda remove --name your_env_name package_name
7.jupyter-notebook添加python虚拟环境
conda install -n tensorflow ipykernel
8.生成ipykernel的配置文件(–name之后跟的是在jupyter-notebook中对应虚拟环境的kernel名称)
python -m ipykernel install --name tensorflow-notebook
9.测试代码
import tensorflow as tf
tf.compat.v1.disable_eager_execution() # The Session graph is empty. Add operations to the graph before calling run().
sess = tf.compat.v1.Session()
matrix1 = tf.constant([[3., 3.]])
matrix2 = tf.constant([[2.],[2.]])
product = tf.matmul(matrix1, matrix2)
result = sess.run(product)
print(result)
Tensorflow 安装和测试(Anaconda4.7.10+windows10)的更多相关文章
- TensorFlow安装与测试
官网:http://tensorflow.org/安装步骤:1.sudo apt-get install python-pip python-dev python-virtualenv 2.virtu ...
- 机器学习(3)-Tensorflow安装与测试
安装.# Ubuntu/Linux 64-bit $ sudo apt-get install python-pip python-dev # Ubuntu/Linux 64-bit, CPU onl ...
- tensorflow安装过程cpu版-(windows10环境下)---亲试可行方案
tensorflow安装过程cpu版-(windows10环境下)---亲试可行方案 一, 前言:本次安装tensorflow是基于Python的,安装Python的过程不做说明 二, 安装环境: ...
- ArcGIS 10.5 tensorflow安装日记
ArcGIS 10.5 tensorflow安装日记 商务科技合作:向日葵,135-4855__4328,xiexiaokui#qq.com Datetime: 2019年5月27日星期一 Os: w ...
- windows环境下tensorflow安装过程详解
写在最前: 在安装过程中遇到很多坑,一开始自己从官网下载了Python3.6.3或者Python3.6.5或者Python3.7.1等多个版本,然后直接pip install tensorflow或者 ...
- Tensorflow安装教程(Anaconda)
写在最前: 在安装过程中遇到很多坑,一开始自己从官网下载了Python3.6.3或者Python3.6.5或者Python3.7.1等多个版本,然后直接pip install tensorflow或者 ...
- Setup Tensorflow with GPU on Mac OSX 10.11
Setup Tensorflow with GPU on OSX 10.11 环境描述 电脑:MacBook Pro 15.6 CPU: 2.7GHz 显卡: GT 650m 系统:OSX 10.11 ...
- tensorflow安装篇
安装虚拟机redhat7u4-64 镜像文件在http://www.linuxfly.org/post/659 更换yum 参考https://blog.csdn.net/xiaoyiaoyou/ar ...
- 记录一次Python下Tensorflow安装过程,1.7带GPU加速版本
最近由于论文需要,急需搭建Tensorflow环境,16年底当时Tensorflow版本号还没有过1,我曾按照手册搭建过CPU版本.目前,1.7算是比较新的版本了(也可以从源码编译1.8版本的Tens ...
- tensorflow 安装GPU版本,个人总结,步骤比较详细【转】
本文转载自:https://blog.csdn.net/gangeqian2/article/details/79358543 手把手教你windows安装tensorflow的教程参考另一篇博文ht ...
随机推荐
- three.js 性能优化之模型转化与压缩
模型转换 obj转gltf 安装插件 npm i -g obj2gltf 执行转换命令 obj2gltf -i 11-6.obj -o 11-6.gltf -u 模型压缩 安装gltf-pipelin ...
- vue自定义事件及应用场景
自定义事件 <fuzujian :shijianming='fangfa'></fuzujian>//fangfa是父组件的方法 接收使用:props:[shijianming ...
- Taro微信小程序获取Tab页可视区域高度
前情 公司有自己的小程序项目,因公司主要技术栈为react,所以选择了Taro来开发,Taro是京东出品的多端统一开发解决方案,用来开发小程序也相比用原生开发,在开发体验上好很多,而且还能使用成熟的R ...
- Linux&shell通过正则表达式查找文件练习
linux&shell编程中通过正则表达式来匹配查找文件极大的提高查找效率. 首先,解释一下下边出现的命令. linux部分: ls:查看文件夹内的命令. |:管道. grep:搜索后边匹配的 ...
- java - Powermock-Failed to transform class with name...ArrayIndexOutOfBoundsException: 3
I'm trying to run a junit test. i'm using: junit 4.10,easymock 3.0,powermock-core 1.4.10 (uses javas ...
- 深入理解 Servlet:从基础概念到高级特性与实战应用
一.Servlet简介与工作原理 Servlet是Java Web开发中的重要组件,它运行在服务器端,用于处理客户端的请求并返回响应.其工作原理涉及多个组件和步骤,从客户端发起请求到服务器端的处理和响 ...
- Qt编写4K/8K大分辨率播放器(8K占用1%CPU)
一.前言 在经过多种内核的洗礼以后,逐渐对不同内核的不同音视频文件和视频流进行大量的对比测试,比如测试对各种格式的支持性,对各种网络流的支持程度,在同一个地址下占用的CPU/GPU资源比对,最终发现播 ...
- FluentAssertions:C#单元测试断言库,让测试代码更加直观、易读!
推荐一个C#开源库,用于单元测试中的断言,它提供了一系列的扩展方法,使得单元测试的断言看起来更加自然流畅. 01 项目简介 FluentAssertions 是一个基于 .NET 的断言库,它提供了一 ...
- PostgreSQL 数据库的启动与停止管理
title: PostgreSQL 数据库的启动与停止管理 date: 2024/12/28 updated: 2024/12/28 author: cmdragon excerpt: 作为一个强大的 ...
- vmstorage如何将原始指标转换为有组织的历史
vmstorage如何将原始指标转换为有组织的历史 参考自:vmstorage-how-it-handles-data-ingestion vmstorage是VictoriaMetrics中负责处理 ...