![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
深度学习 基于Python语言和TensorFlow平台
大春SSC
这个作者很懒,什么都没留下…
展开
-
3 初识TensorFlow
3.1 score1a搭建解决三好学生成绩问题的神经网络程序:import tensorflow as tf#德、智、体数值输入x1 = tf.placeholder(dtype=tf.float32)x2 = tf.placeholder(dtype=tf.float32)x3 = tf.placeholder(dtype=tf.float32)#权重w1 = tf.Varia...转载 2019-07-12 21:58:27 · 283 阅读 · 0 评论 -
15 优化器的选择与设置
优化器效率对比15.1 optimizer1程序:import tensorflow as tfxData = [1, 2, 3, 4, 5]yTrainData = [3, 5, 7, 9, 11]x = tf.placeholder(shape=[], dtype=tf.float32)yTrain = tf.placeholder(shape=[], dtype=tf.fl...转载 2019-07-16 18:53:49 · 325 阅读 · 0 评论 -
14 循环神经网络初探
实现汇率预测LSTM网络的代码14.1 lstm1程序:import tensorflow as tfimport numpy as npimport pandas as pdimport sysroundT = 100#训练轮次learnRateT = 0.001#优化器学习率argt = sys.argv[1:]print("argt: %s" % argt)for...转载 2019-07-16 18:52:28 · 291 阅读 · 0 评论 -
13 用卷积神经网络进行图像识别
卷积层的具体计算过程13.1 conv1程序:import numpy as npxData1 = np.array([[0, 0], [0, 1]], dtype=np.float32)xData2 = np.array([[0, 1], [1, 0]], dtype=np.float32)filterT = np.array([[1, 2], [3, 4]], dtype=n...转载 2019-07-15 22:13:29 · 849 阅读 · 0 评论 -
12 在其他语言中调用TensorFlow模型
如何保存模型12.1 idcard9test0712.py 程序:import tensorflow as tfimport randomimport osimport sysimport shutilifRestartT = Falseargt = sys.argv[1:]for v in argt: if v == "-restart": if...转载 2019-07-15 22:04:51 · 356 阅读 · 0 评论 -
11 用高级工具简化建模和训练过程
11.1 Keras1程序:import tensorflow.contrib.keras as kimport randomimport numpy as nprandom.seed()rowSize = 4rowCount = 8192xDataRandom = np.full((rowCount, rowSize), 5, dtype=np.float32)yTra...转载 2019-07-15 15:45:51 · 565 阅读 · 0 评论 -
10 用训练好的模型进行预测
从命令行参数读取需要预测的数据10.1 predict1程序:import numpy as npimport syspredictData = Noneargt = sys.argv[1:]for v in argt: if v.startswith("-predict="): tmpStr = v[len("-predict="):] ...转载 2019-07-15 11:34:33 · 5295 阅读 · 0 评论 -
9 查看图形化的模型
用TensorBoard查看数据流图9.1 graph1程序:import tensorflow as tfx = tf.placeholder(shape=[1, 3], dtype=tf.float32)w = tf.Variable(tf.ones([3, 3]), dtype=tf.float32)b = tf.Variable(1, dtype=tf.float32)...转载 2019-07-15 09:37:57 · 302 阅读 · 0 评论 -
8 保存和载入训练过程
保存训练过程8.1 idcard4程序:import tensorflow as tfimport randomrandom.seed()x = tf.placeholder(tf.float32)yTrain = tf.placeholder(tf.float32)w1 = tf.Variable(tf.random_normal([4, 8], mean=0.5, std...转载 2019-07-14 22:25:42 · 326 阅读 · 0 评论 -
7 多层全连接神经网络
单层网络的模型7.1 idcard1程序:import tensorflow as tfimport randomrandom.seed()x = tf.placeholder(tf.float32)yTrain = tf.placeholder(tf.float32)w = tf.Variable(tf.random_normal([4], mean=0.5, stdde...转载 2019-07-14 20:47:25 · 1426 阅读 · 0 评论 -
6 从文件中载入训练数据
行数据拆分及如何喂给训练过程6.1 score2a程序:import tensorflow as tfimport numpy as npimport pandas as pdfileData = pd.read_csv('E:\学习资料\深度学习\深度学习基于Python语言和TensorFlow平台\AI_Resources\pub\代码\data.txt', dtype=np...转载 2019-07-14 17:42:39 · 228 阅读 · 0 评论 -
5 用神经网络解决非线性问题
使用随机数据进行训练5.1 score2a程序:import tensorflow as tfimport randomrandom.seed()x = tf.placeholder(dtype=tf.float32)yTrain = tf.placeholder(dtype=tf.float32)w = tf.Variable(tf.zeros([3]), dtype=tf...转载 2019-07-14 17:09:01 · 849 阅读 · 0 评论 -
4 简化神经网络模型
4.1 score1d用向量重新组织输入数据程序:转载 2019-07-13 17:06:48 · 648 阅读 · 0 评论 -
16 下一步学习方向指南
最后的实例16.1 imageclassiffy程序:import osimport sysfrom PIL import Image # 使用第三方包Pillow来进行图像处理import numpy as npimport keras as kimport scipy.spatial.distance as distance # 使用第三方包scipy来进行向量余弦相似...转载 2019-07-16 18:54:31 · 257 阅读 · 0 评论