tensorflow
phlovexz
这个作者很懒,什么都没留下…
展开
-
TensorFlow Basic
Constantimport numpy as np import tensorflow as tfsess = tf.Session()str = tf.constant("this is a string") str_out = sess.run(str)print str # <tf.Tensor 'Const_3:0' shape=() dtype=string> print str_out原创 2016-06-28 16:08:04 · 435 阅读 · 0 评论 -
Tensorflow: recurrent neural network char-level 1
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.models.rnn import rnn, rnn_cell from tensorflow.models.rnn import seq2seqimport collections# @karpathy data =原创 2016-07-05 17:59:27 · 1076 阅读 · 2 评论 -
Tensorflow: recurrent neural network char-level 0
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.models.rnn import rnn, rnn_cell from tensorflow.models.rnn import seq2seqimport collections# @karpathy data =原创 2016-07-05 14:28:32 · 542 阅读 · 0 评论 -
Tensorflow: RNN/LSTM gradient clipping
lr = 0.01 max_grad_norm = 5tvars = tf.trainable_variables() grads, _ = tf.clip_by_global_norm(tf.gradients(loss, tvars), max_grad_norm) opt = tf.train.GradientDescentOptimizer(lr) # opt = tf.train.Adam原创 2016-07-04 22:53:11 · 3526 阅读 · 0 评论 -
Tensorflow: recurrent neural network (mnist basic)
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data from tensorflow.models.rnn import rnn, rnn_cellmnist = input_data.r原创 2016-07-04 22:40:38 · 723 阅读 · 0 评论 -
Tensorflow: Convolutional Neural Network Basic
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data from tensorflow.python.training.training_util import global_stephid原创 2016-06-30 21:17:07 · 902 阅读 · 0 评论 -
Tensorflow: Deep Multi-Layer Pecptron with Xavier Initializer
Xavier initializerhttps://github.com/google/prettytensor/blob/a69f13998258165d6682a47a931108d974bab05e/prettytensor/layers.pyimport numpy as np import tensorflow as tf import matplotlib.pyplot as plt f原创 2016-06-30 19:08:04 · 891 阅读 · 0 评论 -
Tensorflow: Deep Multi-Layer Pecptron Mnist
import numpy as np import tensorflow as tf import matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_datahidden_layer_size = [256]*4 input_layer_size = 784 output_layer_size原创 2016-06-30 18:06:53 · 373 阅读 · 0 评论 -
Tensorflow: Logistic Regression Mnist
import numpy as np import os import matplotlib.pyplot as plt import pprint # from sklearn.datasets import load_boston import tensorflow as tf from tensorflow.examples.tutorials.mnist import input_datam原创 2016-06-30 15:13:15 · 1291 阅读 · 0 评论 -
Tensorflow: Linear Regression
toy datasetimport numpy as np import os from scipy.misc import imread, imresize import matplotlib.pyplot as plt import pprint from sklearn.datasets import load_bostondef toy_dataset(n): w, b = 0.7,原创 2016-06-28 22:57:58 · 468 阅读 · 0 评论 -
Tensorflow : Basic Dataset generation
import numpy as np import os from scipy.misc import imread, imresize import matplotlib.pyplot as plt import pprintcwd = os.getcwd() ################################################################# def原创 2016-06-28 21:50:29 · 1112 阅读 · 0 评论 -
Tensorflow Image Processing Basic 2: Load Images from folder
import numpy as np import os from scipy.misc import imread, imresize import matplotlib.pyplot as plt import pprintcwd = os.getcwd()def load_img_from_folder(path): valid_exts = ['.jpg', '.png', '.jp原创 2016-06-28 20:57:18 · 695 阅读 · 0 评论 -
Tensorflow Image Processing Basic
import numpy as np import os from scipy.misc import imread, imresize import matplotlib.pyplot as pltcwd = os.getcwd()def print_typeshape(img): print "type is %s" % type(img) print "shape is %s"原创 2016-06-28 20:39:38 · 589 阅读 · 0 评论 -
Tensorflow mnist basic
import numpy as np import tensorflow as tfimport matplotlib.pyplot as plt from tensorflow.examples.tutorials.mnist import input_data from tensorflow.contrib.learn.python.learn.datasets import mnist fro原创 2016-06-28 20:02:53 · 461 阅读 · 0 评论 -
tf.get_variable tf.variable_scope tf.name_scope
http://blog.csdn.net/u012436149/article/details/53081454 http://www.cnblogs.com/Charles-Wan/p/6200446.html 1\tf.get_variable, tf.variable_scope tf.get_variable 和tf.Variable不同的一点是,前者拥有一个变量检查转载 2017-05-04 21:31:26 · 417 阅读 · 0 评论