0

I have created repo

https://github.com/joyjeni/tensorflowexample.git

I m trying to do logistic regression on kaggle titanic dataset

I get below error

OutOfRangeError: RandomShuffleQueue '_398_shuffle_batch_16/random_shuffle_queue' is closed and has insufficient elements (requested 100, current size 0)

Can someone tell me why current size is 0.

cchamberlain
  • 17,444
  • 7
  • 59
  • 72
Rehoboth
  • 43
  • 2
  • 6

1 Answers1

0

I assume you are trying to execute the logistic regression example found in the Tensorflow for Machine Intelligence book.

When the csv file is loaded, the path is incorrect:

Instead of using

filename_queue = tf.train.string_input_producer([os.path.dirname(__file__) + "/" + file_name])

use

filename_queue = tf.train.string_input_producer([os.path.join(os.getcwd(), file_name)])

The first line will load the file "/train.csv" while the second one will load "yourPath/train.csv". Due to the fact that the first file doesn't exists, no data to train can be loaded.

The source code of all of the book's examples can be found in the following repo:

https://github.com/backstopmedia/tensorflowbook

Jonathan Wheeler
  • 2,539
  • 1
  • 19
  • 29