I'm trying to fit my deep learning model with a custom generator.

When i fit the model, it shows me this error: enter image description here

I tried to find similar questions, but all the answers were about converting lists to numpy array. I think that's not the question in this error. My lists are all in numpy array format. This custom generator is based on a custom generator from here

This is the part of code where I fit the model: on

where the variables are:

  • representations_path - is a string with the directory to the path where i store the training files, that which file is the input to model
  • target_path - is a string with the directory to the path where i store the target files, that which file is the target of the model (output)
  • training_filenames - is a list with the names of training and target files (both have the same name, but they are in different folders)
  • batch_size - integer with the size of the batch. It has the value 7.

My generator class is below: enter image description here

How can I fix this error?

Thank you mates!

  • $\begingroup$ Hi and welcome to AI SE. Please, provide the source code and not just the screenshots. Btw, this question is better suited for Stack Overflow, because here we focus on theoretical and philosophical aspects of AI, while SO is more suited for programming issues, which is your case. $\endgroup$ – nbro Feb 14 at 19:02

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.