zkmkarlsruhe / language-identification

Spoken Language Identification on Common Voice and AudioSet using Deep Learning
Other
36 stars 7 forks source link

Cannot train with batch size > 1 #3

Open prothej227 opened 2 years ago

prothej227 commented 2 years ago

image

Hi! I am having this issue when training with batch size > 1:

tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
  (0) Invalid argument:  Cannot add tensor to the batch: number of elements does not match. Shapes are: [tensor]: [119130,1], [batch]: [80000,1]
     [[node IteratorGetNext (defined at train.py:117) ]]
  (1) Invalid argument:  Cannot add tensor to the batch: number of elements does not match. Shapes are: [tensor]: [119130,1], [batch]: [80000,1]
     [[node IteratorGetNext (defined at train.py:117) ]]
     [[Shape/_4]]
0 successful operations.
0 derived errors ignored. [Op:__inference_train_function_14011]

Function call stack:
train_function -> train_function
bytosaur commented 2 years ago

it looks like your samples have a different size than I expect. The model expects the sample to be 5sec @16kHz which is 80000 values. Your input has 119130...

danomatika commented 2 years ago

I suggest looking into tools to prepare the samples, ie. resample, change bit rate, trim to length, etc. I suggest checking out sox, a command line tool.

enohp ym morf tnes

Dan Wilcox danomatika.com robotcowboy.com

On Aug 22, 2022, at 4:47 PM, paul @.***> wrote:

 it looks like your samples have a different size than I expect. The model expects the sample to be 5sec @16kHz which is 80000 values. Your input has 119130...

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.