Unverified Commit f8e854b5 authored by Sergii Khomenko's avatar Sergii Khomenko Committed by GitHub
Browse files

Merge branch 'master' into dataset

parents 52c7c53e 31adae53
...@@ -2,7 +2,7 @@ Sequence-to-Sequence with Attention Model for Text Summarization. ...@@ -2,7 +2,7 @@ Sequence-to-Sequence with Attention Model for Text Summarization.
Authors: Authors:
Xin Pan (xpan@google.com, github:panyx0718), Xin Pan
Peter Liu (peterjliu@google.com, github:peterjliu) Peter Liu (peterjliu@google.com, github:peterjliu)
<b>Introduction</b> <b>Introduction</b>
......
...@@ -204,7 +204,7 @@ def inference(images): ...@@ -204,7 +204,7 @@ def inference(images):
kernel = _variable_with_weight_decay('weights', kernel = _variable_with_weight_decay('weights',
shape=[5, 5, 3, 64], shape=[5, 5, 3, 64],
stddev=5e-2, stddev=5e-2,
wd=0.0) wd=None)
conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding='SAME') conv = tf.nn.conv2d(images, kernel, [1, 1, 1, 1], padding='SAME')
biases = _variable_on_cpu('biases', [64], tf.constant_initializer(0.0)) biases = _variable_on_cpu('biases', [64], tf.constant_initializer(0.0))
pre_activation = tf.nn.bias_add(conv, biases) pre_activation = tf.nn.bias_add(conv, biases)
...@@ -223,7 +223,7 @@ def inference(images): ...@@ -223,7 +223,7 @@ def inference(images):
kernel = _variable_with_weight_decay('weights', kernel = _variable_with_weight_decay('weights',
shape=[5, 5, 64, 64], shape=[5, 5, 64, 64],
stddev=5e-2, stddev=5e-2,
wd=0.0) wd=None)
conv = tf.nn.conv2d(norm1, kernel, [1, 1, 1, 1], padding='SAME') conv = tf.nn.conv2d(norm1, kernel, [1, 1, 1, 1], padding='SAME')
biases = _variable_on_cpu('biases', [64], tf.constant_initializer(0.1)) biases = _variable_on_cpu('biases', [64], tf.constant_initializer(0.1))
pre_activation = tf.nn.bias_add(conv, biases) pre_activation = tf.nn.bias_add(conv, biases)
...@@ -262,7 +262,7 @@ def inference(images): ...@@ -262,7 +262,7 @@ def inference(images):
# and performs the softmax internally for efficiency. # and performs the softmax internally for efficiency.
with tf.variable_scope('softmax_linear') as scope: with tf.variable_scope('softmax_linear') as scope:
weights = _variable_with_weight_decay('weights', [192, NUM_CLASSES], weights = _variable_with_weight_decay('weights', [192, NUM_CLASSES],
stddev=1/192.0, wd=0.0) stddev=1/192.0, wd=None)
biases = _variable_on_cpu('biases', [NUM_CLASSES], biases = _variable_on_cpu('biases', [NUM_CLASSES],
tf.constant_initializer(0.0)) tf.constant_initializer(0.0))
softmax_linear = tf.add(tf.matmul(local4, weights), biases, name=scope.name) softmax_linear = tf.add(tf.matmul(local4, weights), biases, name=scope.name)
......
...@@ -157,6 +157,7 @@ def distorted_inputs(data_dir, batch_size): ...@@ -157,6 +157,7 @@ def distorted_inputs(data_dir, batch_size):
# Create a queue that produces the filenames to read. # Create a queue that produces the filenames to read.
filename_queue = tf.train.string_input_producer(filenames) filename_queue = tf.train.string_input_producer(filenames)
with tf.name_scope('data_augmentation'):
# Read examples from files in the filename queue. # Read examples from files in the filename queue.
read_input = read_cifar10(filename_queue) read_input = read_cifar10(filename_queue)
reshaped_image = tf.cast(read_input.uint8image, tf.float32) reshaped_image = tf.cast(read_input.uint8image, tf.float32)
...@@ -226,6 +227,7 @@ def inputs(eval_data, data_dir, batch_size): ...@@ -226,6 +227,7 @@ def inputs(eval_data, data_dir, batch_size):
if not tf.gfile.Exists(f): if not tf.gfile.Exists(f):
raise ValueError('Failed to find file: ' + f) raise ValueError('Failed to find file: ' + f)
with tf.name_scope('input'):
# Create a queue that produces the filenames to read. # Create a queue that produces the filenames to read.
filename_queue = tf.train.string_input_producer(filenames) filename_queue = tf.train.string_input_producer(filenames)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment