title: unable to stack batch by using dense_to_ragged_batch in TFRecordDataset - tensorflow
body: <p>there!<br/>
   I was trying to concat var with diffient shapes into batches by using raggedTensor.<br/>
   I had preprocessed wav into mfcc and stored it in tfrecords.<br/>
   When I loaded them with TFRecordDataset, and tried using dense_to_ragged_batch to stack var into a raggedTensor.<br/>
   A error occured and It said &quot;Cannot batch tensors with different shapes in component 0.&quot;<br/>
   I had tried using tf.data.Dataset to achieve the same thing without preprocessing,and also using dense_to_ragged_batch to stack batches.But it works fun.<br/>
  Yours,<br/>
  Soya.<br/>
  A mini code shows below.</p>
  <pre><code>def parse_tfrecord(proto):
      features = {
          'label': tf.io.FixedLenFeature([], tf.string),
          'mfcc': tf.io.FixedLenFeature([], tf.string)
      }
      out = tf.io.parse_single_example(proto, features)
      mfcc = tf.io.parse_tensor(out['mfcc'], out_type='float32')
      label = out['label']
      return label, mfcc
  def parse_tfrecord_data(data_raw):
      line, mfcc = parse_tfrecord(data_raw)
      return mfcc
  def get_datasets():
      record_files = [os.path.join(train_record_dir, filename) for filename in os.listdir(train_record_dir)]
      dataset = tf.data.TFRecordDataset(record_files, num_parallel_reads=4).map(parse_tfrecord_data,
                                                                                num_parallel_calls=16)
      dataset = dataset.apply(tf.data.experimental.dense_to_ragged_batch(batch_size=global_batch_size))
      return dataset
  
  if __name__ == '__main__':
      tf.data.experimental.enable_debug_mode()
      dataset = get_datasets()
      batch = next(iter(dataset))
  </code></pre>