Skip to content
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

Sorry I don't know why my training .npy file does not work, could you please tell me why? or provide .npy file for train? #2

Open
DanggoRyo opened this issue Sep 22, 2022 · 2 comments

Comments

@DanggoRyo
Copy link

Sorry I don't know why my training .npy file didn't work, could you please tell me why? Or provide .npy file for train?

The following are the errors that result from training with .npy file:

Traceback (most recent call last):
File "e:\HistoSeg\HistoSeg-Tensorflow\HistoSeg_Train.py", line 629, in
results=model.fit(X_train, y_train, batch_size=batch_arg, epochs=epochs_arg, callbacks=callbacks, validation_data=(X_test, y_test) , verbose = 1)
File "E:\Users\15199\anaconda3\envs\Histoseg\lib\site-packages\tensorflow\python\keras\engine\training_v1.py", line 793, in fit
return func.fit(
File "E:\Users\15199\anaconda3\envs\Histoseg\lib\site-packages\tensorflow\python\keras\engine\training_arrays_v1.py", line 644, in fit
return fit_loop(
File "E:\Users\15199\anaconda3\envs\Histoseg\lib\site-packages\tensorflow\python\keras\engine\training_arrays_v1.py", line 380, in model_iteration
batch_outs = f(ins_batch)
File "E:\Users\15199\anaconda3\envs\Histoseg\lib\site-packages\tensorflow\python\keras\backend.py", line 4067, in call
fetched = self._callable_fn(*array_vals,
File "E:\Users\15199\anaconda3\envs\Histoseg\lib\site-packages\tensorflow\python\client\session.py", line 1483, in call
ret = tf_session.TF_SessionRunCallable(self._session._session,
tensorflow.python.framework.errors_impl.InvalidArgumentError: 2 root error(s) found.
(0) INVALID_ARGUMENT: assertion failed: [labels out of bound] [Condition x < y did not hold element-wise:] [x (metrics/mean_io_u/confusion_matrix/control_dependency:0) = ] [0 0 0...] [y (metrics/mean_io_u/confusion_matrix/Cast_2:0) = ] [2]
[[{{function_node metrics_mean_io_u_confusion_matrix_assert_less_Assert_AssertGuard_false_7653}}{{node Assert}}]]
[[expanded_conv_11_project_BN/cond/then/_980/FusedBatchNormV3/_6151]]
(1) INVALID_ARGUMENT: assertion failed: [labels out of bound] [Condition x < y did not hold element-wise:] [x (metrics/mean_io_u/confusion_matrix/control_dependency:0) = ] [0 0 0...] [y (metrics/mean_io_u/confusion_matrix/Cast_2:0) = ] [2]
[[{{function_node metrics_mean_io_u_confusion_matrix_assert_less_Assert_AssertGuard_false_7653}}{{node Assert}}]]

Thanks.

@DanggoRyo DanggoRyo changed the title Sorry I don't know why my training .npy file didn't work, could you please tell me why? or provide .npy file for train? Sorry I don't know why my training .npy file does not work, could you please tell me why? or provide .npy file for train? Sep 22, 2022
@saadwazir
Copy link
Owner

@DanggoRyo
Copy link
Author

Thank you, I know why it can't run before, because the grayscale channel value is 1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants