cmusphinx / g2p-seq2seq

G2P with Tensorflow
Other
667 stars 196 forks source link

Pronunciation consists of only one repeating phone #135

Closed maya-ami closed 6 years ago

maya-ami commented 6 years ago

Hi. I wonder if anyone had a similar problem. I configured the tool and it seemed to train a model without any problems or obvious errors. My tensor flow is 1.5.0 and tensor2tensor is 1.5.7. However when I run g2p on a test set (just 2 words), the suggested pronunciation consists of one phoneme repeated several times. I provide a sample output below. I allowed only 301 steps to train the model. Can it be a result of such a short training?

INFO:tensorflow:Importing user module g2p_seq2seq from path /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/g2p_seq2seq-6.2.0a0-py3.6.egg [2018-06-26 16:14:54,662] Importing user module g2p_seq2seq from path /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/g2p_seq2seq-6.2.0a0-py3.6.egg INFO:tensorflow:Overriding hparams in transformer_base with eval_drop_long_sequences=1,batch_size=4096,num_hidden_layers=3,hidden_size=256,filter_size=512,num_heads=4,length_bucket_step=1.5,max_length=30,min_length_bucket=6 [2018-06-26 16:14:54,671] Overriding hparams in transformer_base with eval_drop_long_sequences=1,batch_size=4096,num_hidden_layers=3,hidden_size=256,filter_size=512,num_heads=4,length_bucket_step=1.5,max_length=30,min_length_bucket=6 INFO:tensorflow:schedule=train_and_evaluate [2018-06-26 16:14:54,672] schedule=train_and_evaluate INFO:tensorflow:worker_gpu=1 [2018-06-26 16:14:54,672] worker_gpu=1 INFO:tensorflow:sync=False [2018-06-26 16:14:54,672] sync=False WARNING:tensorflow:Schedule=train_and_evaluate. Assuming that training is running on a single machine. [2018-06-26 16:14:54,673] Schedule=train_and_evaluate. Assuming that training is running on a single machine. INFO:tensorflow:datashard_devices: ['gpu:0'] [2018-06-26 16:14:54,673] datashard_devices: ['gpu:0'] INFO:tensorflow:caching_devices: None [2018-06-26 16:14:54,674] caching_devices: None INFO:tensorflow:ps_devices: ['gpu:0'] [2018-06-26 16:14:54,674] ps_devices: ['gpu:0'] INFO:tensorflow:Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fa53585a5c0>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_tf_config': gpu_options { per_process_gpu_memory_fraction: 1.0 } , '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_session_config': gpu_options { per_process_gpu_memory_fraction: 0.95 } allow_soft_placement: true graph_options { optimizer_options { } } , '_save_checkpoints_steps': 409, '_keep_checkpoint_max': 1, '_keep_checkpoint_every_n_hours': 1, '_model_dir': 'test/', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x7fa53585a630>} [2018-06-26 16:14:54,677] Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fa53585a5c0>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_tf_config': gpu_options { per_process_gpu_memory_fraction: 1.0 } , '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_session_config': gpu_options { per_process_gpu_memory_fraction: 0.95 } allow_soft_placement: true graph_options { optimizer_options { } } , '_save_checkpoints_steps': 409, '_keep_checkpoint_max': 1, '_keep_checkpoint_every_n_hours': 1, '_model_dir': 'test/', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x7fa53585a630>} WARNING:tensorflow:Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x7fa54b9ebe18>) includes params argument, but params are not passed to Estimator. [2018-06-26 16:14:54,678] Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x7fa54b9ebe18>) includes params argument, but params are not passed to Estimator. INFO:tensorflow:Using ValidationMonitor [2018-06-26 16:14:54,678] Using ValidationMonitor WARNING:tensorflow:From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/monitors.py:267: BaseMonitor.__init__ (from tensorflow.contrib.learn.python.learn.monitors) is deprecated and will be removed after 2016-12-05. Instructions for updating: Monitors are deprecated. Please use tf.train.SessionRunHook. [2018-06-26 16:15:29,490] From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensorflow/contrib/learn/python/learn/monitors.py:267: BaseMonitor.__init__ (from tensorflow.contrib.learn.python.learn.monitors) is deprecated and will be removed after 2016-12-05. Instructions for updating: Monitors are deprecated. Please use tf.train.SessionRunHook. INFO:tensorflow:Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fa53585a5c0>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_tf_config': gpu_options { per_process_gpu_memory_fraction: 1.0 } , '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_session_config': gpu_options { per_process_gpu_memory_fraction: 0.95 } allow_soft_placement: true graph_options { optimizer_options { } } , '_save_checkpoints_steps': 409, '_keep_checkpoint_max': 1, '_keep_checkpoint_every_n_hours': 1, '_model_dir': 'test/', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x7fa53585a630>} [2018-06-26 16:15:29,491] Using config: {'_task_type': None, '_task_id': 0, '_cluster_spec': <tensorflow.python.training.server_lib.ClusterSpec object at 0x7fa53585a5c0>, '_master': '', '_num_ps_replicas': 0, '_num_worker_replicas': 0, '_environment': 'local', '_is_chief': True, '_evaluation_master': '', '_tf_config': gpu_options { per_process_gpu_memory_fraction: 1.0 } , '_tf_random_seed': None, '_save_summary_steps': 100, '_save_checkpoints_secs': None, '_log_step_count_steps': 100, '_session_config': gpu_options { per_process_gpu_memory_fraction: 0.95 } allow_soft_placement: true graph_options { optimizer_options { } } , '_save_checkpoints_steps': 409, '_keep_checkpoint_max': 1, '_keep_checkpoint_every_n_hours': 1, '_model_dir': 'test/', 'use_tpu': False, 't2t_device_info': {'num_async_replicas': 1}, 'data_parallelism': <tensor2tensor.utils.expert_utils.Parallelism object at 0x7fa53585a630>} WARNING:tensorflow:Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x7fa51b239048>) includes params argument, but params are not passed to Estimator. [2018-06-26 16:15:29,491] Estimator's model_fn (<function T2TModel.make_estimator_model_fn.<locals>.wrapping_model_fn at 0x7fa51b239048>) includes params argument, but params are not passed to Estimator. INFO:tensorflow:decode_hp.batch_size not specified; default=32 [2018-06-26 16:15:29,539] decode_hp.batch_size not specified; default=32 INFO:tensorflow:Performing decoding from a file. [2018-06-26 16:15:29,539] Performing decoding from a file. INFO:tensorflow:Getting inputs [2018-06-26 16:15:29,539] Getting inputs INFO:tensorflow: batch 1 [2018-06-26 16:15:29,959] batch 1 INFO:tensorflow:Decoding batch 0 [2018-06-26 16:15:29,960] Decoding batch 0 WARNING:tensorflow:Input graph does not use tf.data.Dataset or contain a QueueRunner. That means predict yields forever. This is probably a mistake. [2018-06-26 16:15:30,045] Input graph does not use tf.data.Dataset or contain a QueueRunner. That means predict yields forever. This is probably a mistake. INFO:tensorflow:Setting T2TModel mode to 'infer' [2018-06-26 16:15:30,059] Setting T2TModel mode to 'infer' INFO:tensorflow:Setting hparams.dropout to 0.0 [2018-06-26 16:15:30,060] Setting hparams.dropout to 0.0 INFO:tensorflow:Setting hparams.layer_prepostprocess_dropout to 0.0 [2018-06-26 16:15:30,060] Setting hparams.layer_prepostprocess_dropout to 0.0 INFO:tensorflow:Setting hparams.symbol_dropout to 0.0 [2018-06-26 16:15:30,060] Setting hparams.symbol_dropout to 0.0 INFO:tensorflow:Setting hparams.attention_dropout to 0.0 [2018-06-26 16:15:30,060] Setting hparams.attention_dropout to 0.0 INFO:tensorflow:Setting hparams.relu_dropout to 0.0 [2018-06-26 16:15:30,060] Setting hparams.relu_dropout to 0.0 INFO:tensorflow:Greedy Decoding [2018-06-26 16:15:30,061] Greedy Decoding WARNING:tensorflow:From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensor2tensor/layers/common_layers.py:600: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead [2018-06-26 16:15:30,942] From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensor2tensor/layers/common_layers.py:600: calling reduce_mean (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead WARNING:tensorflow:From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensor2tensor/utils/beam_search.py:93: calling reduce_logsumexp (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead [2018-06-26 16:15:36,983] From /home/s1780755/miniconda3/envs/mlp/lib/python3.6/site-packages/tensor2tensor/utils/beam_search.py:93: calling reduce_logsumexp (from tensorflow.python.ops.math_ops) with keep_dims is deprecated and will be removed in a future version. Instructions for updating: keep_dims is deprecated, use keepdims instead 2018-06-26 16:15:37.798563: I tensorflow/core/platform/cpu_feature_guard.cc:137] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2 AVX INFO:tensorflow:Restoring parameters from test/model.ckpt-1 [2018-06-26 16:15:37,803] Restoring parameters from test/model.ckpt-1 INFO:tensorflow:Inference results INPUT: fanaticism [2018-06-26 16:15:52,612] Inference results INPUT: fanaticism INFO:tensorflow:Inference results OUTPUT: F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F [2018-06-26 16:15:52,613] Inference results OUTPUT: F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F INFO:tensorflow:Inference results INPUT: gatherer [2018-06-26 16:15:52,613] Inference results INPUT: gatherer INFO:tensorflow:Inference results OUTPUT: F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F [2018-06-26 16:15:52,613] Inference results OUTPUT: F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F F Words: 2 Errors: 2 WER: 1.000 Accuracy: 0.000

nurtas-m commented 6 years ago

Hello, @maya-ami Yes, this is normal behaviour of the program. It is because of an insufficient amount of a training data in your training dictionary.