-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
ValueError: in user code: #399
Comments
Is this question solved? |
Yes |
how to solve it? thank you, and I meet same question. |
It was due to some error in the data loader class. I couldn't fix it, so I used Keras's Image Data Generator instead of Albumentations and Data Loader Class. Also check if the number of classes are correct. If its binary segmentation, make sure you use the method specified in the binary classes notebook else the multi class notebook. To figure out you exact problem, I'll need to see the code that is failing. Can you reply with more details if the above workaround doesn't work. |
the solution is described here #412 (return tuple) |
i am facing same issue. result=model.predict(npp_image) print(result) ERROR ValueError: in user code:
|
@SaddamHosyn In your input layer, you have 0 neurons which is why it is giving error. You input layer should contain neurons equal to number of features. |
train model
history = model.fit_generator(
train_dataloader,
steps_per_epoch=len(train_dataloader),
epochs=EPOCHS,
callbacks=callbacks,
validation_data=valid_dataloader,
validation_steps=len(valid_dataloader),
)
I am getting the following error:
Epoch 1/40
ValueError Traceback (most recent call last)
in ()
6 callbacks=callbacks,
7 validation_data=valid_dataloader,
----> 8 validation_steps=len(valid_dataloader),
9 )
12 frames
/usr/local/lib/python3.6/dist-packages/tensorflow/python/framework/func_graph.py in wrapper(*args, **kwargs)
971 except Exception as e: # pylint:disable=broad-except
972 if hasattr(e, "ag_error_metadata"):
--> 973 raise e.ag_error_metadata.to_exception(e)
974 else:
975 raise
ValueError: in user code:
The text was updated successfully, but these errors were encountered: