文章分类 -  Tensorflow

摘要:K最近邻(k-Nearest Neighbor,KNN)分类算法,是一个理论上比较成熟的方法,也是最简单的机器学习算法之一。该方法的思路是:如果一个样本在特征空间中的k个最相似(即特征空间中最邻近)的样本中的大多数属于某一个类别,则该样本也属于这个类别。 参考:https://baike.baidu 阅读全文
posted @ 2019-05-21 09:20 牧 天 阅读(87) 评论(0) 推荐(0) 编辑
摘要:在机器学习的上下文中,超参数是在开始学习过程之前设置值的参数,而不是通过训练得到的参数数据。 K-MEANS算法是输入聚类个数k,以及包含 n个数据对象的数据库,输出满足方差最小标准k个聚类的一种算法。属于一种经典的无监督学习算法。 参考网址: https://www.jianshu.com/p/c 阅读全文
posted @ 2019-05-20 16:38 牧 天 阅读(532) 评论(0) 推荐(0) 编辑
摘要:from __future__ import print_function import tensorflow as tf #导入MNIST数据集 from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets('./data/', one_hot=True) #... 阅读全文
posted @ 2019-05-20 14:05 牧 天 阅读(219) 评论(0) 推荐(0) 编辑
摘要:a = 2, b = 3常量相加:5常量相乘:6变量相加:5变量相乘:6矩阵常量相称:[[12.]]0123[21.0, 7.0][array([14.], dtype=float32)][14.] 阅读全文
posted @ 2019-05-20 13:50 牧 天 阅读(488) 评论(0) 推荐(0) 编辑
摘要:import tensorflow as tf import numpy import matplotlib.pyplot as plt rng = numpy.random # 超参数 learning_rate = 0.01 training_epochs = 1000 display_step = 50 # 训练数据 train_X = numpy.asarray([3.3... 阅读全文
posted @ 2019-05-16 10:56 牧 天 阅读(304) 评论(0) 推荐(0) 编辑
摘要:文档中的 Python 示例使用一个会话 Session 来 启动图, 并调用 Session.run() 方法执行操作.为了便于使用诸如 IPython 之类的 Python 交互环境, 可以使用 InteractiveSession 代替 Session 类, 使用 Tensor.eval() 阅读全文
posted @ 2019-05-11 09:09 牧 天 阅读(131) 评论(0) 推荐(0) 编辑
摘要:python使用 此模型无法在android上使用 加载模型时会报如下错误java.lang.IllegalArgumentException: ByteBuffer is not a valid flatbuffer model 阅读全文
posted @ 2019-04-30 10:32 牧 天 阅读(756) 评论(0) 推荐(0) 编辑
摘要:https://blog.csdn.net/lilong117194/article/details/79262441 https://blog.csdn.net/lilong117194/article/details/79370831 https://blog.csdn.net/happyorg 阅读全文
posted @ 2019-04-24 15:57 牧 天 阅读(77) 评论(0) 推荐(0) 编辑
摘要:from tensorflow.examples.tutorials.mnist import input_data import tensorflow as tf mnist = input_data.read_data_sets('D:/work_space/eclipse/Pydev/MNIST_data',one_hot=True) sess = tf.InteractiveSess... 阅读全文
posted @ 2019-04-23 10:37 牧 天 阅读(194) 评论(0) 推荐(0) 编辑
摘要:二维卷积函数 tf.nn.conv2d(input, filter, strides, padding, use_cudnn_on_gpu=None, name=None) input的形状:[batch, in_height ,in_width, in_channels] [训练时一个batch的 阅读全文
posted @ 2019-04-22 19:34 牧 天 阅读(481) 评论(0) 推荐(0) 编辑
摘要:mobilenet_v1.tflite cacheLabel.txt 阅读全文
posted @ 2019-04-13 21:05 牧 天 阅读(476) 评论(0) 推荐(0) 编辑
摘要:移植AI到Android平台 提取模型 生成模型converted_model.tflite python读取模型并测试 Android读取模型并测试 Android源码: 另外将converted_model.tflite放入asserts目录中 阅读全文
posted @ 2019-04-13 16:13 牧 天 阅读(628) 评论(0) 推荐(0) 编辑
摘要:生成该模型D:\model\testAdd\combined_model.pb 加载模型并计算 带参数的例子 加载模型 阅读全文
posted @ 2019-04-11 17:15 牧 天 阅读(613) 评论(0) 推荐(0) 编辑
摘要:mnist info (55000, 784) (55000, 10)(10000, 784) (10000, 10)(5000, 784) (5000, 10)0.9169 下面读取模型来验证结果 mnist info (55000, 784) (55000, 10)(10000, 784) (1 阅读全文
posted @ 2019-01-19 11:38 牧 天 阅读(146) 评论(0) 推荐(0) 编辑
摘要:[[-0.22921348 0.68460655] [ 0.21008825 -0.75417924]]Variable a is [[ 3.] [ 6.] [ 9.] [12.] [15.] [18.] [21.] [24.] [27.] [30.]][14.0][array([14.], dty 阅读全文
posted @ 2019-01-19 11:37 牧 天 阅读(276) 评论(0) 推荐(0) 编辑
摘要:这里讲述一个数字识别图像的AI 参考网址:http://www.tensorfly.cn/tfdoc/tutorials/mnist_beginners.html pip install minst y = XW + b mnist info (55000, 784) (55000, 10)(100 阅读全文
posted @ 2019-01-11 15:43 牧 天 阅读(370) 评论(0) 推荐(0) 编辑
摘要:我正使用TensorFlow来训练一个神经网络。我初始化GradientDescentOptimizer的方式如下: 问题是我不知道如何为学习速率或衰减值设置更新规则。如何在这里使用自适应学习率呢? 最佳解决办法首先,tf.train.GradientDescentOptimizer旨在对所有步骤中 阅读全文
posted @ 2018-12-27 17:18 牧 天 阅读(5217) 评论(0) 推荐(0) 编辑
摘要:tensorflow中有一类在tensor的某一维度上求值的函数求最大值tf.reduce_max(input_tensor, reduction_indices=None, keep_dims=False, name=None)求平均值tf.reduce_mean(input_tensor, re 阅读全文
posted @ 2018-12-27 16:40 牧 天 阅读(187) 评论(0) 推荐(0) 编辑
摘要:D:\python\tensorflow>python s.py [0.051186632, 0.09918237][0.10145238, 0.19924887][0.10080577, 0.19958335][0.10044703, 0.19976886][0.100248, 0.1998717 阅读全文
posted @ 2018-12-27 16:10 牧 天 阅读(870) 评论(0) 推荐(0) 编辑
摘要:TensorFlow使用图 (graph) 来表示计算任务. 在被称之为 会话 (Session) 的上下文 (context) 中执行图. 使用张量(tensor) 表示数据. 通过变量 (Variable) 维护状态. 使用feed和fetch可以为任意的操作(arbitrary operati 阅读全文
posted @ 2018-12-10 14:29 牧 天 阅读(1551) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示