as-ideas / ForwardTacotron

⏩ Generating speech in a single forward pass without any attention!
https://as-ideas.github.io/ForwardTacotron/
MIT License
578 stars 113 forks source link

ValueError: need at least one array to stack train_tacotron.py line 192 #70

Open Xlikes opened 2 years ago

Xlikes commented 2 years ago

ValueError: need at least one array to stack

Traceback (most recent call last): File "C:\Users\Pc\Downloads\ForwardTacotron-master\train_tacotron.py", line 192, in trainer.train(model, optimizer) File "C:\Users\Pc\Downloads\ForwardTacotron-master\trainer\taco_trainer.py", line 49, in train self.train_session(model, optimizer, session=session) File "C:\Users\Pc\Downloads\ForwardTacotron-master\trainer\taco_trainer.py", line 70, in train_session for i, batch in enumerate(session.train_set, 1): File "C:\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 521, in next data = self._next_data() File "C:\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 560, in _next_data index = self._next_index() # may raise StopIteration File "C:\Python39\lib\site-packages\torch\utils\data\dataloader.py", line 512, in _next_index return next(self._sampler_iter) # may raise StopIteration File "C:\Python39\lib\site-packages\torch\utils\data\sampler.py", line 229, in iter for idx in self.sampler: File "C:\Users\Pc\Downloads\ForwardTacotron-master\utils\dataset.py", line 337, in iter binned_idx = np.stack(bins).reshape(-1) File "<__array_function__ internals>", line 5, in stack File "C:\Python39\lib\site-packages\numpy\core\shape_base.py", line 423, in stack raise ValueError('need at least one array to stack') ValueError: need at least one array to stack

I have a problem with python train_tacotron.py I have set the Num Validation down to 20. Can this be the cause of the problem? (This setting must be so low because of the 21 files. I am aware of the poor quality.)

Windows 10 cuda 11.3.0 torch 1.10.2

danjeffree commented 1 year ago

Bit late but leaving here in case anyone if the future needs a fix.

Go to line 40 in trainer/taco_trainer.py

create a line under r, lr, max_step, bs = session_params add bs = 2 or whatever number you need.