
机器学习
Mysterious superstar
没有什么是不劳而获的
君子藏器于身,待时而动。不鸣则已,鸣则冲天
展开
-
机器学习必须的软件安装(CPU版)win10+Anaconda,Python3.7+Tensorflow2.0
今天笔者尝试了自己安装机器学习必备的环境安装。首先安装Anaconda去官网下载,选择windows平台下的python3.7检查是否安装成功,在命令行终端输入conda list 如果会显示一些东西那就说明安装成功了。接下来是TensorFlow的安装,在终端输入命令pip install tensorflow==2.0.0-alpha0如果网速太慢可以使用pip i...原创 2019-07-23 22:27:40 · 875 阅读 · 0 评论 -
【深度学习】TensorFlow的基本数据类型,tensor和numpy的相互转化,tensor的基本操作
一、常见数据类型的载体,在python语言中list是一个非常灵活的数据载体,在list中间可以添加任何类型的数据比如:[1,1.2,"hellow",(1,2)],他们分别是整形,浮点型,字符型,元组。可以随意添加、删除,类似于链表的概念。二、为了解决大数据的吞吐,提高存储效率,我们可以用numpy来存储相同类型的数据 np.array 是专门用来解决同类型的数据载体,可以很方便的存储比如...原创 2019-07-25 19:09:56 · 2650 阅读 · 0 评论 -
【深度学习】创建tensor、form numpy to tensor、tf.zeros()、tf.zeros_like()、tf.ones()、tf.fill()、使用正态分布产生随机数、
一、form numpy to tensorC:\Users\hasee>ipythonPython 3.6.5 |Anaconda, Inc.| (default, Mar 29 2018, 13:32:41) [MSC v.1900 64 bit (AMD64)]Type 'copyright', 'credits' or 'license' for more informat...原创 2019-07-26 11:52:36 · 455 阅读 · 0 评论 -
【深度学习】索引与切片1、start:end:step 采样方式、::-1、...、
索引方式一、In [52]: a=tf.ones([1,5,5,3])In [53]: a[0][0]Out[53]:<tf.Tensor: id=157, shape=(5, 3), dtype=float32, numpy=array([[1., 1., 1.], [1., 1., 1.], [1., 1., 1.], [1.,...原创 2019-07-26 17:30:33 · 682 阅读 · 0 评论 -
【深度学习】索引与切片2 tf.gather、tf.gather_nd、tf.boolean_mask()
tf.gathera=tf.random.normal([4,35,8])In [3]: a[2:4].shapeOut[3]: TensorShape([2, 35, 8])In [8]: tf.gather(a,axis=2,indices=[2,1,7,0,6]).shapeOut[8]: TensorShape([4, 35, 5])tf.gather_ndIn [...原创 2019-07-26 18:52:21 · 546 阅读 · 0 评论 -
【机器学习】维度变换、tf.reshape()、tf.transpose()、tf.expand_dims() 、tf.squeeze()
所谓维度变换就是,将一个高维度的数据,通过一定的方式转换为低维度,比如下面的例子。tf.reshape()In [2]: a=tf.random.normal([4,28,28,3])2019-07-27 09:38:52.383549: I tensorflow/core/platform/cpu_feature_guard.cc:142] Your CPU supports in...原创 2019-07-27 12:01:54 · 816 阅读 · 0 评论