Please look into the error that I am getting. The model is just not getting trained. It just run for 1 epoch and throws this error. Please Help.
Error Code →
Epoch 1/20
4500/4500 [==============================] - ETA: 0s - loss: 0.5353 - accuracy: 0.7255
UnimplementedError Traceback (most recent call last)
in
3
4 # Train the model and save the training history
----> 5 history = model.fit(train_pad_trunc_seq, train_labels, epochs=20, validation_data=(val_pad_trunc_seq, val_labels))
/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/eager/execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name)
56 try:
57 ctx.ensure_initialized()
—> 58 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name,
59 inputs, attrs, num_outputs)
60 except core._NotOkStatusException as e:
UnimplementedError: Cast string to float is not supported
[[node binary_crossentropy/Cast
(defined at /opt/conda/lib/python3.8/site-packages/keras/losses.py:1797)
]] [Op:__inference_test_function_28955]
Errors may have originated from an input operation.
Input Source operations connected to node binary_crossentropy/Cast:
In[0] ExpandDims (defined at /opt/conda/lib/python3.8/site-packages/keras/engine/compile_utils.py:677)
Operation defined at: (most recent call last)
File “/opt/conda/lib/python3.8/runpy.py”, line 194, in _run_module_as_main
return _run_code(code, main_globals, None,File “/opt/conda/lib/python3.8/runpy.py”, line 87, in _run_code
exec(code, run_globals)