Getting type error in week 2

can anyone please explain what is the error:-

TypeError Traceback (most recent call last)
in
----> 1 hist = train_mnist(x_train, y_train)

in train_mnist(x_train, y_train)
24 # Fit the model for 10 epochs adding the callbacks
25 # and save the training history
β€”> 26 history = model.fit(x_train, y_train, epochs=10, callbacks=[callbacks])
27
28 ### END CODE HERE

/opt/conda/lib/python3.8/site-packages/keras/utils/traceback_utils.py in error_handler(*args, **kwargs)
65 except Exception as e: # pylint: disable=broad-except
66 filtered_tb = _process_traceback_frames(e.traceback)
β€”> 67 raise e.with_traceback(filtered_tb) from None
68 finally:
69 del filtered_tb

/opt/conda/lib/python3.8/site-packages/keras/callbacks.py in set_model(self, model)
283 model.history = self._history
284 for callback in self.callbacks:
β†’ 285 callback.set_model(model)
286
287 def _call_batch_hook(self, mode, hook, batch, logs=None):

TypeError: set_model() missing 1 required positional argument: β€˜model’

@M_JASWANT_KUMAR Please click my name and message your notebook as an attachment.

1 Like