摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data mnist = input_data.read_data_sets("MNIST_data",one_hot=True) def ad 阅读全文
摘要:
""" Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly. """ #tensorboard --logdir="./" impor 阅读全文
摘要:
import tensorflow as tf #(tf.float32,[2,2]) input1 = tf.placeholder(tf.float32) input2 = tf.placeholder(tf.float32) output = tf.multiply(input1,input2 阅读全文
摘要:
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 Weights = tf.Variable( 阅读全文
摘要:
import tensorflow as tf matrix1 = tf.constant([[3,3]]) matrix2 = tf.constant([[2],[2]]) product = tf.matmul(matrix1,matrix2) #矩阵相乘 # sess = tf.Session 阅读全文