Integer division or modulo by zero problem

Hello,
i’ve been starting to work with dls and i get this error every time i just try to make a simple cnn to see if it works(just flatten and dense layer). I checked the csv multiple times and don’t see, where i have mistakes.
Any help would be appreciated.
Here are the logs:

Runing on decives : [‘/device:CPU:0’]
Traceback (most recent call last):
File “backend\data_gen.py”, line 59, in backend.data_gen.threadsafe_iter.next
File “backend\data_gen.py”, line 391, in DataGenerator
ZeroDivisionError: integer division or modulo by zero
ERROR:root:integer division or modulo by zero
Traceback (most recent call last):
File “backend\run.py”, line 230, in backend.run.begin_training
File “backend\run.py”, line 231, in backend.run.begin_training
File “backend\run.py”, line 109, in backend.run.customFit
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\training.py”, line 819, in fit
use_multiprocessing=use_multiprocessing)
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py”, line 235, in fit
use_multiprocessing=use_multiprocessing)
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py”, line 593, in _process_training_inputs
use_multiprocessing=use_multiprocessing)
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\training_v2.py”, line 706, in _process_inputs
use_multiprocessing=use_multiprocessing)
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py”, line 747, in init
peek, x = self._peek_and_restore(x)
File “C:\Users\jonas\AppData\Local\Programs\DeepLearningStudio\program_data\conda_envs\nn_dls_env\lib\site-packages\tensorflow_core\python\keras\engine\data_adapter.py”, line 850, in _peek_and_restore
peek = next(x)
File “backend\data_gen.py”, line 57, in backend.data_gen.threadsafe_iter.next
File “backend\data_gen.py”, line 67, in backend.data_gen.threadsafe_iter.next
File “backend\data_gen.py”, line 59, in backend.data_gen.threadsafe_iter.next
File “backend\data_gen.py”, line 391, in DataGenerator

Hi Jope,
can you please share the model configuration.
we will come back to you.
Thanks

Dear Dinesh, I don’t know if this is exactly what you want, but here are images of my configuration. I know my CNN doesn’t really make sense, but it’s just a flatten and dense layer, since i wanted to see if i get the error.
I added pictures of the model as well as my data, im using black and white image input and ouput values ranging from 0 to 1 with 10 categories.

Hi jope,

The error you are facing might be because your output port column seems to have continuous values rather than being categorical, can you try encoding them to some other form like (a,b,c) or (1,2,3).

thanks

Hi Yash_97,
I also, as a test, tried to put just 1 and 0 as the labels, but i still get the error. I even thought it could be because of my encoding, but i tried UTF-8, ANSI and so on.
It looks like continous values, but it’s actually just the numbers from 0-9 and i tried to normalize them.

Hi jope,

Can you please share a sample dataset, and all the model configurations at support@deepcognition.ai, so that we can recreate the error and fix it as soon as possible.

Thanks