tf_chatbot_seq2seq_antilm icon indicating copy to clipboard operation
tf_chatbot_seq2seq_antilm copied to clipboard

ValueError: number of bits must be greater than zero

Open SeekPoint opened this issue 8 years ago • 2 comments

reading data line 4600000 reading data line 4700000 reading data line 4800000 reading data line 4900000 reading data line 5000000 I tensorflow/core/common_runtime/gpu/pool_allocator.cc:247] PoolAllocator: After 5476 get requests, put_count=2291 evicted_count=1000 eviction_rate=0.436491 and unsatisfied allocation rate=0.782505 I tensorflow/core/common_runtime/gpu/pool_allocator.cc:259] Raising pool_size_limit_ from 100 to 110 I tensorflow/core/common_runtime/gpu/pool_allocator.cc:247] PoolAllocator: After 0 get requests, put_count=2012 evicted_count=2000 eviction_rate=0.994036 and unsatisfied allocation rate=0 ...... ...... I tensorflow/core/common_runtime/gpu/pool_allocator.cc:247] PoolAllocator: After 0 get requests, put_count=1482 evicted_count=1000 eviction_rate=0.674764 and unsatisfied allocation rate=0 I tensorflow/core/common_runtime/gpu/pool_allocator.cc:247] PoolAllocator: After 27358 get requests, put_count=27432 evicted_count=1000 eviction_rate=0.0364538 and unsatisfied allocation rate=0.0596169 I tensorflow/core/common_runtime/gpu/pool_allocator.cc:259] Raising pool_size_limit_ from 7764 to 8540 global step 500 learning rate 0.5000 step-time 0.31 perplexity 1069.21 @ 2017-06-03 15:21:14.241907 Traceback (most recent call last): File "/usr/local/lib/python3.6/random.py", line 253, in choice i = self._randbelow(len(seq)) File "/usr/local/lib/python3.6/random.py", line 230, in _randbelow r = getrandbits(k) # 0 <= r < 2**k ValueError: number of bits must be greater than zero

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "main.py", line 28, in tf.app.run() File "/usr/local/lib/python3.6/site-packages/tensorflow/python/platform/app.py", line 44, in run _sys.exit(main(_sys.argv[:1] + flags_passthrough)) File "main.py", line 18, in main train(args) File "/tf_chatbot_seq2seq_antilm/lib/train.py", line 112, in train encoder_inputs, decoder_inputs, target_weights = model.get_batch(dev_set, bucket_id) File "/tf_chatbot_seq2seq_antilm/lib/seq2seq_model.py", line 454, in get_batch encoder_input, decoder_input = random.choice(data[bucket_id]) File "/usr/local/lib/python3.6/random.py", line 255, in choice raise IndexError('Cannot choose from an empty sequence') IndexError: Cannot choose from an empty sequence

SeekPoint avatar Jun 03 '17 07:06 SeekPoint

what I found is:

at encoder_input, decoder_input = random.choice(data[bucket_id])

the data contains a [], so it cause a call like random.choice([]) which raise the error

SeekPoint avatar Jun 03 '17 14:06 SeekPoint

Same issue

henryNTUEE avatar Oct 12 '17 05:10 henryNTUEE