摘要:
import tensorflow as tf import numpy as np import matplotlib.pyplot as plt BATCH_START = 0 TIME_STEPS = 20 BATCH_SIZE = 20 INPUT_SIZE = 1 OUTPUT_SIZE 阅读全文
摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data #this is data mnist = input_data.read_data_sets("MNIST_data",one_ho 阅读全文
摘要:
import tensorflow as tf import numpy as np # ##Save to file # W = tf.Variable([[4,5,6],[7,8,9]],dtype=tf.float32,name="weight") # b = tf.Variable([[2, 阅读全文
摘要:
""" Please note, this code is only for python 3+. If you are using python 2+, please modify the code accordingly. """ import tensorflow as tf from skl 阅读全文
摘要:
import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_data import os os.environ["CUDA_DEVICE_ORDER"] = "0,1" mnist = input_dat 阅读全文
摘要:
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 阅读全文