TensorFlow2.0.0安装
(1)在win10中,打开cmd,查看自己的驱动
(2)在安装tensoiflow之前请先安装Anoconda。
(3)本人电脑驱动版本大于410,故使用一条命令就可安装(打开cmd)
conda install tensorflow-gpu==2.0.0
接下来一路选择yes既可以。
(4)检查GPu版本的TensorFlow是否安装成功
#打开cmd
jupyer notebook
在浏览器中弹出如下界面
import tensorflow as tf
tf.test.is_gpu_available()
fashion mnist数据集详细实现过程
希望你已经成功安装了TensorFlow,若有错误多看看其他的安装博客,不要灰心呀!!
接下来这一部分是本文的重点!!请仔细查看,如有错误请及时指出,谢谢
导入模块
import matplotlib as mpl
import matplotlib.pyplot as plt
%matplotlib inline
import numpy as np
import sklearn
import pandas as pd
import os
import sys
import time
import tensorflow as tf
from tensorflow import keras
print(tf.__version__)
print(sys.version_info)
for module in mpl,np,pd,sklearn,tf,keras:
print(module.__name__,module.__version__)