I'm trying to train the model on another dataset for Persian language. I've created the dataset using create_training_data.py and my dataset is just like ljspeech. But when in run train.py I see the following error:
`starting training from scratch
TRAINING
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/context.py", line 2102, in execution_mode
yield
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 758, in _next_internal
output_shapes=self._flat_output_shapes)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_dataset_ops.py", line 2610, in iterator_get_next
_ops.raise_from_not_ok_status(e, name)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 6843, in raise_from_not_ok_status
six.raise_from(core._status_to_exception(e.code, message), None)
File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: All elements in a batch must have the same rank as the padded shape for component2: expected rank 1 but got element with rank 2 [Op:IteratorGetNext]
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/mahdi/Temp/TTS/TransformerTTS/train_forward.py", line 96, in
test_mel, test_phonemes, test_durs, test_fname = valid_dataset.next_batch()
File "/home/mahdi/Temp/TTS/TransformerTTS/preprocessing/datasets.py", line 199, in next_batch
return next(self.data_iter)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 736, in next
return self.next()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 772, in next
return self._next_internal()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 764, in _next_internal
return structure.from_compatible_tensor_list(self._element_spec, ret)
File "/usr/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/context.py", line 2105, in execution_mode
executor_new.wait()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/executor.py", line 67, in wait
pywrap_tfe.TFE_ExecutorWaitForAllPendingNodes(self._handle)
tensorflow.python.framework.errors_impl.InvalidArgumentError: All elements in a batch must have the same rank as the padded shape for component2: expected rank 1 but got element with rank 2
Process finished with exit code 1
`
I don't know what is the problem. Can somebody help me please?
Hi,
I'm trying to train the model on another dataset for Persian language. I've created the dataset using create_training_data.py and my dataset is just like ljspeech. But when in run train.py I see the following error:
`starting training from scratch
TRAINING Traceback (most recent call last): File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/context.py", line 2102, in execution_mode yield File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 758, in _next_internal output_shapes=self._flat_output_shapes) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/ops/gen_dataset_ops.py", line 2610, in iterator_get_next _ops.raise_from_not_ok_status(e, name) File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/ops.py", line 6843, in raise_from_not_ok_status six.raise_from(core._status_to_exception(e.code, message), None) File "", line 3, in raise_from
tensorflow.python.framework.errors_impl.InvalidArgumentError: All elements in a batch must have the same rank as the padded shape for component2: expected rank 1 but got element with rank 2 [Op:IteratorGetNext]
During handling of the above exception, another exception occurred:
Traceback (most recent call last): File "/home/mahdi/Temp/TTS/TransformerTTS/train_forward.py", line 96, in
test_mel, test_phonemes, test_durs, test_fname = valid_dataset.next_batch()
File "/home/mahdi/Temp/TTS/TransformerTTS/preprocessing/datasets.py", line 199, in next_batch
return next(self.data_iter)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 736, in next
return self.next()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 772, in next
return self._next_internal()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/data/ops/iterator_ops.py", line 764, in _next_internal
return structure.from_compatible_tensor_list(self._element_spec, ret)
File "/usr/lib/python3.6/contextlib.py", line 99, in exit
self.gen.throw(type, value, traceback)
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/context.py", line 2105, in execution_mode
executor_new.wait()
File "/usr/local/lib/python3.6/dist-packages/tensorflow/python/eager/executor.py", line 67, in wait
pywrap_tfe.TFE_ExecutorWaitForAllPendingNodes(self._handle)
tensorflow.python.framework.errors_impl.InvalidArgumentError: All elements in a batch must have the same rank as the padded shape for component2: expected rank 1 but got element with rank 2
Process finished with exit code 1 `
I don't know what is the problem. Can somebody help me please?