Cast string to float is not supported

[code removed - moderator]

Hello there,

I recieved the following error message: “Cast string to float is not supported”. I already checked the function “parse_data_from_file()” but I could not find a mistake. Does anybody know why the error occured and how I can fix it?

Please print the dtype attribute of the training and validation data & labels before invoking model.fit. That should help in figuring out the mistake.

1 Like

Thank you for your reply, it finally worked now!

I think the solution It’s not clear. I had the same error and it was because I assigned my labels in the function parse_data_from_file as strings instead of int/float. I mean forgot to cast the data in row[0] to int or float: int(row[0])

Just check out the expected output in that point.

1 Like