Rayhane-mamah / Tacotron-2

DeepMind's Tacotron-2 Tensorflow implementation
MIT License
2.25k stars 911 forks source link

ValueError: please enter a valid model to train: ['Tacotron', 'WaveNet', 'Tacotron-2'] #530

Open xionghan1 opened 1 year ago

xionghan1 commented 1 year ago

(task) E:\tensorflow\Tacotron-2>python train.py --model='Tacotron-2' WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

Traceback (most recent call last): File "train.py", line 138, in main() File "train.py", line 123, in main raise ValueError('please enter a valid model to train: {}'.format(accepted_models)) ValueError: please enter a valid model to train: ['Tacotron', 'WaveNet', 'Tacotron-2']

I don‘t modify any code, why ? Preprocessing can be performed well tensorflow 1.14 numpy 1.15

xionghan1 commented 1 year ago

it can be performed when I add a quotation mark...... (task) E:\tensorflow\Tacotron-2>python train.py --model="Tacotron-2" WARNING:tensorflow: The TensorFlow contrib module will not be included in TensorFlow 2.0. For more information, please see:

WARNING:tensorflow:From E:\tensorflow\Tacotron-2\tacotron\models\modules.py:81: The name tf.nn.rnn_cell.RNNCell is deprecated. Please use tf.compat.v1.nn.rnn_cell.RNNCell instead.

Using TensorFlow backend. WARNING:tensorflow:From E:\tensorflow\Tacotron-2\wavenet_vocoder\models\modules.py:539: The name tf.layers.Conv2D is deprecated. Please use tf.compat.v1.layers.Conv2D instead.

WARNING:tensorflow:From E:\tensorflow\Tacotron-2\wavenet_vocoder\models\modules.py:697: The name tf.layers.Conv2DTranspose is deprecated. Please use tf.compat.v1.layers.Conv2DTranspose instead.

#############################################################

Tacotron Train

###########################################################

Checkpoint path: logs-Tacotron-2\taco_pretrained\tacotron_model.ckpt Loading training data from: training_data/train.txt Using model: Tacotron-2 Hyperparameters: GL_on_GPU: True NN_init: True NN_scaler: 0.3 allow_clipping_in_normalization: True attention_dim: 128 attention_filters: 32 attention_kernel: (31,) attention_win_size: 7 batch_norm_position: after cbhg_conv_channels: 128 cbhg_highway_units: 128 ......

but it still has errors,

Errors may have originated from an input operation. Input Source operations connected to node datafeeder/input_queue_enqueue: datafeeder/input_queue (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:85) datafeeder/split_infos (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:81) datafeeder/targets_lengths (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:80) datafeeder/input_lengths (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:76) datafeeder/token_targets (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:78) datafeeder/inputs (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:75) datafeeder/linear_targets (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:79) datafeeder/mel_targets (defined at E:\tensorflow\Tacotron-2\tacotron\feeder.py:77)

Original stack trace for 'datafeeder/input_queue_enqueue': File "train.py", line 138, in main() File "train.py", line 132, in main train(args, log_dir, hparams) File "train.py", line 52, in train checkpoint = tacotron_train(args, log_dir, hparams) File "E:\tensorflow\Tacotron-2\tacotron\train.py", line 399, in tacotron_train return train(log_dir, args, hparams) File "E:\tensorflow\Tacotron-2\tacotron\train.py", line 152, in train feeder = Feeder(coord, input_path, hparams) File "E:\tensorflow\Tacotron-2\tacotron\feeder.py", line 86, in init self._enqueue_op = queue.enqueue(self._placeholders) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\ops\data_flow_ops.py", line 345, in enqueue self._queue_ref, vals, name=scope) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\ops\gen_data_flow_ops.py", line 4410, in queue_enqueue_v2 timeout_ms=timeout_ms, name=name) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\framework\op_def_library.py", line 788, in _apply_op_helper op_def=op_def) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\util\deprecation.py", line 507, in new_func return func(*args, **kwargs) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\framework\ops.py", line 3616, in create_op op_def=op_def) File "C:\Users\lenovo.conda\envs\task\lib\site-packages\tensorflow\python\framework\ops.py", line 2005, in init self._traceback = tf_stack.extract_stack()

Traceback (most recent call last): File "train.py", line 138, in main() File "train.py", line 132, in main train(args, log_dir, hparams) File "train.py", line 57, in train raise('Error occured while training Tacotron, Exiting!') TypeError: exceptions must derive from BaseException

xionghan1 commented 1 year ago

set batch_size=4; in hparams.py