C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\training.py:1915: UserWarning: Model.fit_generator
is deprecated and will be removed in a future version. Please use Model.fit
, which supports generators.
warnings.warn('Model.fit_generator
is deprecated and '
Traceback (most recent call last):
File "C:\Users\Ganesh\Desktop\FaceMask\FaceMaskDetector\facemask.py", line 58, in
model_saved=model.fit_generator(
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\training.py", line 1918, in fit_generator
return self.fit(
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\training.py", line 1108, in fit
data_handler = data_adapter.get_data_handler(
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\data_adapter.py", line 1348, in get_data_handler
return DataHandler(*args, **kwargs)
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\data_adapter.py", line 1138, in init
self._adapter = adapter_cls(
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\data_adapter.py", line 916, in init
super(KerasSequenceAdapter, self).init(
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\data_adapter.py", line 793, in init
peek, x = self._peek_and_restore(x)
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras\engine\data_adapter.py", line 927, in _peek_and_restore
return x[0], x
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras_preprocessing\image\iterator.py", line 65, in getitem
return self._get_batches_of_transformed_samples(index_array)
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras_preprocessing\image\iterator.py", line 231, in _get_batches_of_transformed_samples
x = img_to_array(img, data_format=self.data_format)
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\keras_preprocessing\image\utils.py", line 309, in img_to_array
x = np.asarray(img, dtype=dtype)
File "C:\Users\Ganesh\AppData\Local\Programs\Python\Python39\lib\site-packages\numpy\core_asarray.py", line 83, in asarray
return array(a, dtype, copy=False, order=order)
TypeError: array() takes 1 positional argument but 2 were given