安装Anaconda 5.2 + tensorflow 1.9
TensorFlow最简教程
用jupyter和pycharm分别验证TensorFlow小程序
- import tensorflow as tf
-
- # 创建2个矩阵,前者1行2列,后者2行1列,然后矩阵相乘:
-
- matrix1 = tf.constant([[3,3]])
-
- matrix2 = tf.constant([[2], [2]])
-
- product = tf.matmul(matrix1,matrix2)
-
- # 上边的操作是定义图,然后用会话Session去计算:
-
- with tf.Session() as sess:
-
- result2 = sess.run(product)
-
- print(result2)
安装opencv 3.4
验证opencv小程序
- #导入cv模块
-
- import cv2 as cv
-
- #读取图像,支持 bmp、jpg、png、tiff 等常用格式
-
- img = cv.imread("D:\python\test.jpg")
-
- #创建窗口并显示图像
-
- cv.namedWindow("Image")
-
- cv.imshow("Image",img)
-
- cv.waitKey(0)
-
- #释放窗口
-
- cv2.destroyAllWindows()
安装Sklearn
参考:
Win10下在Anaconda新建的环境中安装sklearn_MI_farmer的博客-CSDN博客_anaconda安装sklearn