一.步骤: 导入包以及读取数据 设置参数 数据预处理 构建模型 编译模型 训练以及测试模型 二.代码: 1.导入包以及读取数据 #导入包 import numpy as np np.random.seed(1337) #设置之后每次执行代码,产生的随机数都一样 from tensorflow.examples.tutorials.mnist import input_data from keras.utils import np_utils from keras.models import Se…
一.步骤: 导入模块以及读取数据 数据预处理 构建模型 编译模型 训练模型 测试 二.代码: 导入模块以及读取数据 #导包 import numpy as np np.random.seed(1337) # from keras.datasets import mnist from keras.utils import np_utils # 主要采用这个模块下的to_categorical函数,将该函数转成one_hot向量 from keras.models import Sequential…
一.步骤: 导入包和读取数据 数据预处理 编码层和解码层的建立 + 构建模型 编译模型 训练模型 测试模型[只用编码层来画图] 二.代码: 1.导入包和读取数据 #导入相关的包 import numpy as np np.random.seed(1337) # for reproducibility from keras.datasets import mnist from keras.models import Model #采用通用模型 from keras.layers import De…
  一.Matplotlib[结果可视化] #import os #os.environ['TF_CPP_MIN_LOG_LEVEL'] = '2' import tensorflow as tf import numpy as np import matplotlib.pyplot as plt #添加一个神经层,定义添加神经层的函数 def add_layer(inputs, in_size, out_size, activation_function = None): Weights =…
一.机器学习算法分类: 监督学习:提供数据和数据分类标签.--分类.回归 非监督学习:只提供数据,不提供标签. 半监督学习 强化学习:尝试各种手段,自己去适应环境和规则.总结经验利用反馈,不断提高算法质量 遗传算法:淘汰弱者,留下强者,进行繁衍和变异穿产生更好的算法. 二.选择机器学习算法和数据集 sklearn中有很多真实的数据集可以引入,也可以根据自己的需求自动生成多种数据集.对于数据集可以对其进行归一化处理. sklearn中的有着多种多样的算法,每一种算法都有其适用的场合.不同的属性和功…
一.TensorFlow中的优化器 tf.train.GradientDescentOptimizer:梯度下降算法 tf.train.AdadeltaOptimizer tf.train.AdagradOptimizer tf.train.MomentumOptimizer:动量梯度下降算法 tf.train.AdamOptimizer:自适应矩估计优化算法 tf.train.RMSPropOptimizer tf.train.AdagradDAOptimizer tf.train.FtrlO…
# View more python tutorials on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code is only…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
#调用查看线性回归的几个属性 # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code is only for python 3+. If you are using python 2+, please…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
# View more python learning tutorial on my Youtube and Youku channel!!! # Youtube video tutorial: https://www.youtube.com/channel/UCdyjiB5H8Pu7aDTNVXTTpcg # Youku video tutorial: http://i.youku.com/pythontutorial """ Please note, this code…
bilibili莫烦tensorflow视频教程学习笔记 1.初次使用Tensorflow实现一元线性回归 # 屏蔽警告 import os os.environ[' import numpy as np import tensorflow as tf # create dataset x_data = np.random.rand(100).astype(np.float32) y_data = x_data * 2 + 5 ### create tensorflow structure St…
bilibili莫烦scikit-learn视频学习笔记 1.使用KNN对iris数据分类 from sklearn import datasets from sklearn.model_selection import train_test_split from sklearn.neighbors import KNeighborsClassifier # 从datasets中导入iris数据,包含150条样本,每条样本4个feature iris_data = datasets.load_i…
莫烦视频网址 这个代码实现了预测和可视化 import os # third-party library import torch import torch.nn as nn import torch.utils.data as Data import torchvision import matplotlib.pyplot as plt # torch.manual_seed() # reproducible # Hyper Parameters EPOCH = # train the tra…
一.keras的backend设置 有两种方式: 1.修改JSON配置文件 修改~/.keras/keras.json文件内容为: { "iamge_dim_ordering":"tf", "epsilon":1e-07, "floatx":"float32", "backend":"tensorflow" } 官方文档解释: iamge_data_format:字符…
稍稍乱入的CNN,本文依然是学习周莫烦视频的笔记. 还有 google 在 udacity 上的 CNN 教程. CNN(Convolutional Neural Networks) 卷积神经网络简单讲就是把一个图片的数据传递给CNN,原涂层是由RGB组成,然后CNN把它的厚度加厚,长宽变小,每做一层都这样被拉长,最后形成一个分类器: 如果想要分成十类的话,那么就会有0到9这十个位置,这个数据属于哪一类就在哪个位置上是1,而在其它位置上为零. 在 RGB 这个层,每一次把一块核心抽出来,然后厚度…
各种优化器的比较 莫烦的对各种优化通俗理解的视频 import torch import torch.utils.data as Data import torch.nn.functional as F from torch.autograd import Variable import matplotlib.pyplot as plt # 超参数 LR = 0.01 BATCH_SIZE = EPOCH = # 生成假数据 # torch.unsqueeze() 的作用是将一维变二维,torc…
import torch from torch.autograd import Variable import matplotlib.pyplot as plt torch.manual_seed() # fake data x = torch.unsqueeze(torch.linspace(-,,),dim=) y = x.pow() + 0.2 * torch.rand(x.size()) x, y = Variable(x,requires_grad=False), Variable(y…
目录: Keras简介 Keras学习手册 Keras学习视频 Keras代码案例 Keras&NLP Keras&CV Keras项目 一.Keras简介 Keras是Python中以CNTK.Tensorflow或者Theano为计算后台的一个深度学习建模环境.相对于其他深度学习的框架,如Tensorflow.Theano.Caffe等,Keras在实际应用中有一些显著的优点,其中最主要的优点就是Keras已经高度模块化了,支持现有的常见模型(CNN.RNN等),更重要的是建模过程相当…
官网实例详解-目录和实例简介-keras学习笔记四 2018-06-11 10:36:18 wyx100 阅读数 4193更多 分类专栏: 人工智能 python 深度学习 keras   版权声明:本文为博主原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明. 本文链接:https://blog.csdn.net/wyx100/article/details/80647379 https://github.com/keras-team/keras/tree/mast…
软件环境(Windows): Visual Studio Anaconda CUDA MinGW-w64 conda install -c anaconda mingw libpython CNTK TensorFlow-gpu Keras-gpu Theano MKL CuDNN 参考书籍:谢梁 , 鲁颖 , 劳虹岚.Keras快速上手:基于Python的深度学习实战 Keras 简介 Keras 这个名字来源于希腊古典史诗<奥德赛>的牛角之门(Gate of Horn):Those tha…
一.MINIST数据集下载 1.https://pjreddie.com/projects/mnist-in-csv/      此网站提供了mnist_train.csv和mnist_test.csv,其中mnist_train.csv有60000个训练数据,mnist_test.csv有10000个测试数据 2.还有两个较小数据集,可供测试. https://raw.githubusercontent.com/makeyourownneuralnetwork/makeyourownneura…
滴:转载引用请注明哦[握爪] https://www.cnblogs.com/zyrb/p/9700343.html 莫烦教程是一个免费的机器学习(不限于)的学习教程,幽默风俗的语言让我们这些刚刚起步的小白们感到Friendly~o(* ̄︶ ̄*)o.为了巩固自己的记忆,也小小の贡献于他人,将莫烦教程进行整理.难免于有错误恳请批评指正,也希望自己始终能愉悦的学习!PS:大多数为整理文本,少部分添加自己的理解. Artificial Neural Nets VS Neural Nets ? 二三十年…
特别棒的一篇文章,仍不住转一下,留着以后需要时阅读 基于Theano的深度学习(Deep Learning)框架Keras学习随笔-01-FAQ…
1,感谢莫烦 2,第一个实例:用tf拟合线性函数 import tensorflow as tf import numpy as np # create data x_data = np.random.rand(100).astype(np.float32) y_data = x_data*0.1 + 0.3 #先创建我们的线性函数目标 #搭建模型 Weights = tf.Variable(tf.random_uniform([1], -1.0, 1.0)) biases = tf.Varia…
上篇文章简单的学习了tesseract-ocr识别图片中的英文(链接地址如下:https://www.cnblogs.com/wj-1314/p/9428909.html),看起来效果还不错,所以这篇文章继续深入学习tesseract-ocr识别图片中的中文. 一,准备中文字库 下载chi_sim.traindata字库.要有这个才能识别中文.下好后,放到Tesseract-OCR项目的tessdata文件夹里面.(注意下载字库,一定要看库对应的tesseract版本下载) 为什么强调版本呢 ,…
原文:Emgu-WPF学习使用-识别二维码的位置    参考链接:http://blog.csdn.net/gaobobo138968/article/details/47663607    我完全参照该链接实现了二维码的位置锁定,向原作者致敬.    由于我使用的为最新版本的Emgu,很多封装函数调用方法有所变化,新手接触Emgu,尝试做了调整,部分参数也做了微调!    我使用的Emgu版本:emgucv-windesktop 3.2.0.2682    最终我实现的效果图如下: 前台xam…