摘要: import tensorflow as tf from sklearn.datasets import load_digits from sklearn.cross_validation import train_test_split from sklearn.preprocessing import LabelBinarizer #load data digits = load_digit... 阅读全文
posted @ 2018-03-31 21:17 路边的十元钱硬币 阅读(200) 评论(0) 推荐(0) 编辑
摘要: 解释 compute_accuracy 的计算原理: 来自:https://blog.csdn.net/cy_tec/article/details/52046806 阅读全文
posted @ 2018-03-31 21:15 路边的十元钱硬币 阅读(193) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import numpy as np import matplotlib.pyplot as plt # # add layer # def add_layer(inputs, in_size, out_size,n_layer, activation_function = None): layer_name = '... 阅读全文
posted @ 2018-03-31 21:14 路边的十元钱硬币 阅读(202) 评论(0) 推荐(0) 编辑
摘要: 注意:有些浏览器可能支持的不好,推荐使用最新的Chrome 命令行输入: tensorboard --logdir=logs/ 阅读全文
posted @ 2018-03-31 21:13 路边的十元钱硬币 阅读(142) 评论(0) 推荐(0) 编辑
摘要: 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 = tf.Variable(tf.random_normal([i... 阅读全文
posted @ 2018-03-31 21:10 路边的十元钱硬币 阅读(173) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf import numpy as np def add_layer(inputs, in_size, out_size, activation_function = None): Weights = tf.Variable(tf.random_normal([in_size, out_size])) # hang lie ... 阅读全文
posted @ 2018-03-31 21:09 路边的十元钱硬币 阅读(193) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) output = tf.multiply(input1, input2) with tf.Session() as sess: print(ses... 阅读全文
posted @ 2018-03-31 21:07 路边的十元钱硬币 阅读(89) 评论(0) 推荐(0) 编辑
摘要: 加法 累加1 加3次 阅读全文
posted @ 2018-03-31 21:05 路边的十元钱硬币 阅读(157) 评论(0) 推荐(0) 编辑
摘要: import tensorflow as tf matrix1 = tf.constant([[3,3]]) # 1X2 matrix2 = tf.constant([[2], [2]]) product = tf.matmul(matrix1, matrix2) #method 1 #sess = tf.Ses... 阅读全文
posted @ 2018-03-31 21:04 路边的十元钱硬币 阅读(153) 评论(0) 推荐(0) 编辑
摘要: 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 ### create tensorflow structure start ### Weights ... 阅读全文
posted @ 2018-03-31 21:03 路边的十元钱硬币 阅读(185) 评论(0) 推荐(0) 编辑