Expected float32, but got auto of type 'str'

can anyone help me with this :
TypeError Traceback (most recent call last)
1 # grader-required-cell
----> 3 hist = train_happy_sad_model(gen)

in train_happy_sad_model(train_generator)
34 # Your model should achieve the desired accuracy in less than 15 epochs.
35 # You can hardcode up to 20 epochs in the function below but the callback should trigger before 15.
—> 36 history = model.fit(x=train_generator,
37 epochs=15,
38 callbacks=[callbacks]

/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/tensorflow/python/framework/func_graph.py in autograph_handler(*args, **kwargs)
1127 except Exception as e: # pylint:disable=broad-except
1128 if hasattr(e, “ag_error_metadata”):
→ 1129 raise e.ag_error_metadata.to_exception(e)
1130 else:
1131 raise

TypeError: in user code:

File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 878, in train_function  *
    return step_function(self, iterator)
File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 867, in step_function  **
    outputs = model.distribute_strategy.run(run_step, args=(data,))
File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 860, in run_step  **
    outputs = model.train_step(data)
File "/opt/conda/lib/python3.8/site-packages/keras/engine/training.py", line 809, in train_step
    loss = self.compiled_loss(
File "/opt/conda/lib/python3.8/site-packages/keras/engine/compile_utils.py", line 201, in __call__
    loss_value = loss_obj(y_t, y_p, sample_weight=sw)
File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 141, in __call__
    losses = call_fn(y_true, y_pred)
File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 245, in call  **
    return ag_fn(y_true, y_pred, **self._fn_kwargs)
File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 310, in __init__  **
    super().__init__(mean_squared_error, name=name, reduction=reduction)
File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 227, in __init__
    super().__init__(reduction=reduction, name=name)
File "/opt/conda/lib/python3.8/site-packages/keras/losses.py", line 88, in __init__
File "/opt/conda/lib/python3.8/site-packages/keras/utils/losses_utils.py", line 82, in validate
    if key not in cls.all():

TypeError: Expected float32, but got auto of type 'str'.

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

Edit: Please pass either a string or an object of the loss function you’d like to use within model.compile method. Providing a reference to a class is an invalid option. Do read about the loss parameter here