title: IndexError: Cannot choose from an empty sequence
body: <p>I am trying to run this command <code>python run.py --mode MLE</code>
  and got this error. I am not able to find the correct solution for it .</p>
  
  <pre><code>Traceback (most recent call last):
    File "run.py", line 208, in &lt;module&gt;
      train_MLE()
    File "run.py", line 94, in train_MLE
      encoder_input, decoder_input, weight = model.get_batch(d_valid, i)
    File "C:\Users\Kriti Gupta\Desktop\GitHub_repo\Seq2seq-Chatbot-With-Deep-Reinforcement-Learning\seq2seq_model.py", line 342, in get_batch
      encoder_input, decoder_input = random.choice(data[bucket_id])
    File "C:\Users\Kriti Gupta\AppData\Local\Programs\Python\Python37\lib\random.py", line 261, in choice
      raise IndexError('Cannot choose from an empty sequence') from None
  IndexError: Cannot choose from an empty sequence
  </code></pre>
  
  <p>Below is the code which contains the function</p>
  
  <pre><code>def get_batch(self, data, bucket_id, rand = True, order = False):
      # data should be [whole_data_length x (source, target)] 
      # decoder_input should contain "GO" symbol and target should contain "EOS" symbol
      encoder_size, decoder_size = self.buckets[bucket_id]
      encoder_inputs, decoder_inputs = [], []
      #print(bucket_id)
      print(random.choice(data[bucket_id]))
  
      encoder_input, decoder_input = random.choice(data[bucket_id])
      c = 0
  
      for i in xrange(self.batch_size):
        if rand:
          encoder_input, decoder_input = random.choice(data[bucket_id])
        if order:
          encoder_input, decoder_input = data[bucket_id][i]
          c += 1 
  </code></pre>
  
  <p>Please help!!</p>