Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hparams error on colab #626

Open
catafest opened this issue Mar 30, 2024 · 3 comments
Open

hparams error on colab #626

catafest opened this issue Mar 30, 2024 · 3 comments

Comments

@catafest
Copy link

I try to run this colab https://github.com/catafest/colab_google/blob/master/catafest_0059.ipynb , but I got this error:

AttributeError                            Traceback (most recent call last)
<ipython-input-66-474e2af39ea2> in <cell line: 4>()
      2 from hparams import create_hparams
      3 
----> 4 hparams = hparams.create_hparams()
      5 hparams.sampling_rate = 22050
      6 model = Tacotron2(hparams)

/content/tacotron2/hparams.py in create_hparams(hparams_string, verbose)
      6     """Create model hyperparameters. Parse nondefault from given string."""
      7 
----> 8     hparams = tf.training.HParams(
      9         ################################
     10         # Experiment Parameters        #

AttributeError: module 'tensorflow' has no attribute 'contrib'

I try to fix with this , but I got same error:

%cd tacotron2

!tf_upgrade_v2 --intree "/content/tacotron2" --outtree "/content/tacotron2_v2" --reportfile "/content/report.txt"
2024-03-30 20:36:11.334420: E external/local_xla/xla/stream_executor/cuda/cuda_dnn.cc:9261] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered
2024-03-30 20:36:11.334480: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:607] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered
2024-03-30 20:36:11.335826: E external/local_xla/xla/stream_executor/cuda/cuda_blas.cc:1515] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered
2024-03-30 20:36:12.772044: W tensorflow/compiler/tf2tensorrt/utils/py_utils.cc:38] TF-TRT Warning: Could not find TensorRT
Output directory '/content/tacotron2_v2' must not already exist.
@Abhisitthqgam
Copy link

Abhisitthqgam commented Apr 3, 2024

@catafest
Copy link
Author

catafest commented Apr 4, 2024

I fix somehow with ...

import tensorflow as tf
from tensorboard.plugins.hparams import api as hp
hparams = hp.hparams
hparams.mask_padding = False
hparams.sampling_rate = 22050
hparams.fp16_run=True
hparams.n_mel_channels=80
hparams.n_frames_per_step=1
hparams.n_symbols = 148
hparams.symbols_embedding_dim = 512
hparams.encoder_n_convolutions = 3
hparams.encoder_embedding_dim = 512
hparams.encoder_kernel_size = 5
hparams.attention_rnn_dim = 1024
hparams.decoder_rnn_dim=1024
hparams.prenet_dim=256
hparams.max_decoder_steps=1000
hparams.gate_threshold=0.5
hparams.p_attention_dropout=0.1
hparams.p_decoder_dropout=0.1
hparams.early_stopping=True
hparams.attention_dim = 128
hparams.attention_location_n_filters=32
hparams.attention_location_kernel_size=31
hparams.n_frames_per_step=1
hparams.decoder_rnn_dim=1024
hparams.prenet_dim=256
hparams.max_decoder_steps=1000
hparams.gate_threshold=0.5
hparams.p_attention_dropout=0.1
hparams.p_decoder_dropout=0.1
hparams.postnet_embedding_dim=512
hparams.postnet_kernel_size=5
hparams.postnet_n_convolutions=5
hparams.decoder_no_early_stopping=False

@Abhisitthqgam
Copy link

ฉันจะแก้ไขอย่างใดด้วย ...

import tensorflow as tf
from tensorboard.plugins.hparams import api as hp
hparams = hp.hparams
hparams.mask_padding = False
hparams.sampling_rate = 22050
hparams.fp16_run=True
hparams.n_mel_channels=80
hparams.n_frames_per_step=1
hparams.n_symbols = 148
hparams.symbols_embedding_dim = 512
hparams.encoder_n_convolutions = 3
hparams.encoder_embedding_dim = 512
hparams.encoder_kernel_size = 5
hparams.attention_rnn_dim = 1024
hparams.decoder_rnn_dim=1024
hparams.prenet_dim=256
hparams.max_decoder_steps=1000
hparams.gate_threshold=0.5
hparams.p_attention_dropout=0.1
hparams.p_decoder_dropout=0.1
hparams.early_stopping=True
hparams.attention_dim = 128
hparams.attention_location_n_filters=32
hparams.attention_location_kernel_size=31
hparams.n_frames_per_step=1
hparams.decoder_rnn_dim=1024
hparams.prenet_dim=256
hparams.max_decoder_steps=1000
hparams.gate_threshold=0.5
hparams.p_attention_dropout=0.1
hparams.p_decoder_dropout=0.1
hparams.postnet_embedding_dim=512
hparams.postnet_kernel_size=5
hparams.postnet_n_convolutions=5
hparams.decoder_no_early_stopping=False

Where did you put the Data Parameters?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants