-
Notifications
You must be signed in to change notification settings - Fork 85
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can u Help Me Type Error #2
Comments
Can you solve this error? I get a commin error. If you help. I'm glad. Thank you good work. |
Hello, did you get any solution for that? |
Hi all. Sorry for the (very) late response. Unfortunately, I am unable to replicate this error. My first suggestion is to ensure you have the identical version of Keras and Pandas, which successful use of the "flow_from_dataframe" function may depend on. |
Hey guys, The following changes work for me: Then I read the dataframes for train, val and test with dtype=str This prevents the error message: "TypeError: If class_mode="categorical", y_col="label" column values must be type string, list or tuple." but leads to a new error: "Found 0 validated image filenames belonging to 9 classes." I don't know why, all the tutorials I could find suggested that "train_dataframe" was correct, some recommended using absolute filenames. That's why I did:
and then
An finally I called train_data_generator.flow_from_dataframe as followed: Here I put the predefined list of strings into classes=CLASSES_str. |
Thanks @Arne-van-Au. Does this fix work for you, @NegarTavakoli? |
Thanks Alex for pushing. I hope my raw kind of coding is not too terrible. :-) |
Same issue encountered, I cannot find the changelog of Keras to see when they changed this behaviour, but indeed they do not accept the data in the form presented in this repo anymore:
What I did is similar to what Arne proposes, however I decided to use the full category names, instead of stringified indices:
later, when calling
note you need to change this 3 times for each dataframe. Finally, if needed, you can call |
unzip these zips is the way to solve the problem. |
Good luck with. I have encountered such an error while instructing the model according to your instructions. I get a Type error in "train_data_generator" in "deepweeds.py". How can I solve this error? If you help. I'm glad. Thank you good work.
The text was updated successfully, but these errors were encountered: