摘要:
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 ... 阅读全文
摘要:
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... 阅读全文
摘要:
加法 累加1 加3次 阅读全文
摘要:
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... 阅读全文
摘要:
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 ... 阅读全文