-
Notifications
You must be signed in to change notification settings - Fork 704
Description
Description
Hello, I encountered an issue while testing the retrained FarGAN model after adding a new dataset to tts_speech_negative_16k.sw
. Below are the steps I followed:
-
Data Dumping:
./dump_data -train ../../opus/dnn/torch/fargan/tts_speech_negative_16k.sw ../dump_feature/out_features.f32 ../dump_feature/out_speech.pcm
-
Training:
python ./train_fargan.py ../dump_feature/out_features.f32 ../dump_feature/out_speech.pcm output_dir --epochs 400 --batch-size 2048 --lr 0.002 --cuda-visible-devices 0
-
Adversarial Training:
python adv_train_fargan.py ../dump_feature/out_features.f32 ../dump_feature/out_speech.pcm output_dir --lr 0.000002 --reg-weight 5 --batch-size 160 --cuda-visible-devices 0 --initial-checkpoint output_dir/checkpoints/fargan_400.pth
-
Testing:
python test_fargan.py output_dir/checkpoints/fargan_adv_1.pth ../dump_feature/test_features.f32 output_speech.pcm
During Step 4 (testing), the following error occurred:
File "/home/fxw/SE/deep_enc_dec/fargan_enc_dec/train_fargan/fargan.py", line 255, in forward
pred = torch.gather(exc_mem, 1, idx)
RuntimeError: index -1 is out of bounds for dimension 1 with size 256
The issue arises because idx
contains negative values (-1), which is invalid for indexing dimension 1 of a tensor with size 256.
Possible Causes and Questions
- Data Preprocessing: Could the new dataset introduced values that lead to invalid indices during inference?
- Model Compatibility: Does the model architecture or training process require adjustments when adding new data?
- Index Calculation: Is there a potential issue in the code logic that computes
idx
(e.g., miscalculations or out-of-range values)?
Request for Help
I would appreciate any insights into why idx
might contain negative values and I want to fix it, but I don't know why this is happening. Thank you!