Reputation: 1
model.fit(X_train, y_train, batch_size=128, epochs=30)
i am using this and i got this error
Epoch 1/30
UnimplementedError Traceback (most recent call last) ~\AppData\Local\Temp\ipykernel_1768\4221927022.py in ----> 1 model.fit(X_train, y_train, batch_size=128, epochs=30)
c:\Users\decil\anaconda3\lib\site-packages\keras\utils\traceback_utils.py in error_handler(*args, **kwargs)
68 # To get the full stack trace, call:
69 # tf.debugging.disable_traceback_filtering()
---> 70 raise e.with_traceback(filtered_tb) from None
71 finally:
72 del filtered_tb
c:\Users\decil\anaconda3\lib\site-packages\tensorflow\python\eager\execute.py in quick_execute(op_name, num_outputs, inputs, attrs, ctx, name) 50 try: 51 ctx.ensure_initialized() ---> 52 tensors = pywrap_tfe.TFE_Py_Execute(ctx._handle, device_name, op_name, 53 inputs, attrs, num_outputs) 54 except core._NotOkStatusException as e:
UnimplementedError: Graph execution error:
Detected at node 'sequential/Cast' defined at (most recent call last): File "c:\Users\decil\anaconda3\lib\runpy.py", line 197, in _run_module_as_main return _run_code(code, main_globals, None, File "c:\Users\decil\anaconda3\lib\runpy.py", line 87, in _run_code ... File "c:\Users\decil\anaconda3\lib\site-packages\keras\engine\functional.py", line 762, in _conform_to_reference_input tensor = tf.cast(tensor, dtype=ref_input.dtype) Node: 'sequential/Cast' Cast string to float is not supported [[{{node sequential/Cast}}]] [Op:__inference_train_function_529]
Please help me in this issue
Upvotes: 0
Views: 657
Reputation: 1
I see the problem is here Cast string to float is not supported
basically you're trying to pass a string (maybe the labels?) when the model expects a number (float). But I don't have enough info to help you any further.
Upvotes: 0