TensorFlow
进程击序的媛
身体和灵魂,健身与学习,都在路上。
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
一个例子训练神经网络(tenserflow)
import tensorflow as tfimport numpy as np#create datax_data = np.random.randn(100)y_data = x_data*0.3 + 0.1#create tensorflow structure startWeight = tf.Variable(tf.random_uniform([1], -1.0, ...原创 2018-04-10 21:50:43 · 502 阅读 · 0 评论 -
tf.Session
import tensorflow as tfimport numpy as npmatrix1 = tf.constant([[3,3]])matrix2 = tf.constant([[2], [2]])product = tf.matmul(matrix1, matrix2)# method1sess = tf.Session()...原创 2018-04-10 22:05:53 · 450 阅读 · 0 评论 -
Placeholder()传入值的应用
import tensorflow as tfimport numpy as npinput1 = tf.placeholder(tf.float32)input2 = tf.placeholder(tf.float32)output = tf.multiply(input1, input2)with tf.Session() as sess: print(sess.run(o...原创 2018-04-10 23:50:34 · 1141 阅读 · 0 评论 -
添加层add_layer()
import tensorflow as tfimport numpy as npdef add_layer(inputs, input_size, output_size, activation_function = None): Weights = tf.Variable(tf.random_normal([input_size, output_size])) biase...原创 2018-04-11 09:51:35 · 2976 阅读 · 0 评论 -
建造神经网络
import tensorflow as tfimport numpy as npdef add_layer(inputs, input_size, output_size, activation_function = None): Weights = tf.Variable(tf.random_normal([input_size, output_size])) biase...原创 2018-04-11 14:29:13 · 255 阅读 · 0 评论 -
结果可视化
import tensorflow as tfimport numpy as npimport matplotlib.pyplot as pltdef add_layer(inputs, input_size, output_size, activation_function = None): Weights = tf.Variable(tf.random_normal([inpu...原创 2018-04-11 16:22:41 · 973 阅读 · 1 评论
分享