-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error while running the code #15
Comments
same error here |
Use Model.fit, which supports generators. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 useModel.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
The text was updated successfully, but these errors were encountered: