-
Notifications
You must be signed in to change notification settings - Fork 29
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
class_weight in .fit fails with InvalidArgumentError: Graph execution error: #28
Comments
@sachinprasadhs was able to replicate the issue reported here. Thank you! |
Hi @Satori1313, you have 3 classes in your training and you are setting class_weight for just two classes. The following code should fix your issue.
|
Hi @divyashreepathihalli, I don't understand why you're talking about three classes.
In your example, y_train = np.random.randint(0, 1, size=(1000, 100)), the entire y_train array consists exclusively of '0'." y_train.max() |
Hello, any updates on this issue? Is there a workaround or fix available for using class weights with .fit()? Thank you. |
A simple model throws an error "InvalidArgumentError: Graph execution error" when using the 'class_weight' parameter. Without this parameter, the model trains without any issues. Conducted multiple experiments; the error is reproducible both on a local PC and in Google Colab
keras version: '2.10.0'
The text was updated successfully, but these errors were encountered: