The requested array has an inhomogeneous shape after 2 dimensions, eventhough sequence length is the same

154 views Asked by At

I'm building an RNN model that reads spectrograms files. When I'm extracting features and labels and and assigning it to X & y, then try to convert it to numpy array, I would get this error: ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 2 dimensions. The detected shape was (1440, 128) + inhomogeneous part. I made sure that the length of sequence of features in X is the same, which is 128. Therefore, I'm confused why I'm getting this error, when the length is the same. More, I tried to add padding, but still did not work and I would get a different kind of error. I would highly appreciate any kind of feedback. Thank you.

0

There are 0 answers