Please paste the subset of the code including the tf.cond and the batch joins.
Hi--I'm training a deep network with two data input pipelines, one for training and one for validation. They use `shuffle_batch_join` and `batch_join` respectively for parallel data reading. The data stream that is used in the network is decided using a `tf.cond` operation on top of these two pipelines, which is controlled by a `is_training` placeholder that is set to true for a training iteration and false when doing validation. I have 4 threads for reading training data and 1 thread for validation.However, I just added the queue summaries to tensorboard, and observed that validation queue's summary (showing fraction of the queue that is full) gets non-zero at one point during the training, and then drops back to 0. This seems very weird because validation runs only after 1K iterations, and those data points should only be removed at that point. Does anyone have a similar experience or can shed some light into what might be happening?ThanksRohit
You received this message because you are subscribed to the Google Groups "Discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+u...@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/a84cb43a-5fc2-4aec-8fce-7c8b88802b43%40tensorflow.org.
def _input_pipeline(self, filenames, batch_size, num_epochs, mode='train', modality='spatial', num_read_threads=4, num_samples=25): if mode == 'train': shuffle = True else: shuffle = False filename_queue = tf.train.string_input_producer( filenames, num_epochs=num_epochs, shuffle=shuffle) example_list = [self._read_from_disk(filename_queue, modality, num_samples, mode) for _ in range(num_read_threads)] if mode == 'train': min_after_dequeue = 100 capacity = min_after_dequeue + 3 * batch_size example_batch, label_batch = tf.train.shuffle_batch_join( example_list, batch_size=batch_size, capacity=capacity, min_after_dequeue=min_after_dequeue) else: example_batch, label_batch = tf.train.batch_join(example_list, batch_size) return example_batch, label_batch def gen_net(...): with tf.variable_scope('input_pipeline_train') as scope: train_batch, train_labels_batch = self._input_pipeline(train_filenames, BATCH_SIZE, num_epochs, mode='train', modality=modality, num_read_threads=num_read_threads, num_samples=num_samples) with tf.variable_scope('input_pipeline_val') as scope: val_batch, val_labels_batch = self._input_pipeline(val_filenames, BATCH_SIZE, num_epochs, mode='test', modality=modality, num_read_threads=1, num_samples=num_samples) frames_batch, labels_batch, vlad_dropout_keep_prob_selected = tf.cond( is_training, lambda: (train_batch, train_labels_batch, tf.constant(vlad_dropout_keep_prob)), lambda: (val_batch, val_labels_batch, tf.constant(1.0)), )
... then the network that takes as input frames_batch and labels_batchLook at the documentation of tf.cond. both enqueue operations are being executed on every iteration.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CANh2OKp54PO0CJxdPD3yAm9eJTJ4Q3JnFtqAbT4HV7d_ND%3DM4w%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/e002cf48-7d5e-4f4b-b5b1-8f727c21a4f1%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/db37463e-4369-43da-b9ab-8c154eeea2c9%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CADtzJKNY3S8qH%3Dr7YuejkcNQJypsp28DJ_thLRAnR%2BLDgB0Hqg%40mail.gmail.com.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/CADtzJKPC%3DHyRb5cYb8bKin6Qee%3DCVCb7Jtzi%2BF8HB56y-ppPsA%40mail.gmail.com.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/46ec3688-98ab-4259-bd6e-4f5f8f8d2f5f%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/46ec3688-98ab-4259-bd6e-4f5f8f8d2f5f%40tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/46ec3688-98ab-4259-bd6e-4f5f8f8d2f5f%40tensorflow.org.
To unsubscribe from this group and stop receiving emails from it, send an email to discuss+unsubscribe@tensorflow.org.
To post to this group, send email to dis...@tensorflow.org.
To view this discussion on the web visit https://groups.google.com/a/tensorflow.org/d/msgid/discuss/79f4a2e0-081f-4f42-bb89-87ceb2736310%40tensorflow.org.