Commit 20becf84 authored by ppwwyyxx's avatar ppwwyyxx

rollback

parent dd1ac6b0
......@@ -47,14 +47,14 @@ def get_model(inputs, is_training):
image, label = inputs
image = tf.expand_dims(image, 3) # add a single channel
if is_training:
# augmentations
image, label = tf.train.slice_input_producer(
[image, label], name='slice_queue')
image = tf.image.random_brightness(image, 0.1)
image, label = tf.train.shuffle_batch(
[image, label], BATCH_SIZE, CAPACITY, MIN_AFTER_DEQUEUE,
num_threads=2, enqueue_many=False)
#if is_training: # slow
## augmentations
#image, label = tf.train.slice_input_producer(
#[image, label], name='slice_queue')
#image = tf.image.random_brightness(image, 0.1)
#image, label = tf.train.shuffle_batch(
#[image, label], BATCH_SIZE, CAPACITY, MIN_AFTER_DEQUEUE,
#num_threads=2, enqueue_many=False)
conv0 = Conv2D('conv0', image, out_channel=32, kernel_shape=5)
pool0 = MaxPooling('pool0', conv0, 2)
......@@ -100,9 +100,9 @@ def get_config():
IMAGE_SIZE = 28
dataset_train = Mnist('train')
dataset_train = BatchData(Mnist('train'), 128)
dataset_test = BatchData(Mnist('test'), 256, remainder=True)
step_per_epoch = dataset_train.size() / BATCH_SIZE
step_per_epoch = dataset_train.size()
#step_per_epoch = 20
#dataset_test = FixedSizeData(dataset_test, 20)
......
......@@ -39,10 +39,7 @@ class EnqueueThread(threading.Thread):
for dp in self.dataflow.get_data():
if self.coord.should_stop():
return
feed = {}
for var, data in izip(self.input_vars, dp):
data = expand_dim_if_necessary(var, data)
feed[var] = data
feed = dict(izip(self.input_vars, dp))
self.sess.run([self.op], feed_dict=feed)
except tf.errors.CancelledError as e:
pass
......
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