You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi Authors,
I am getting errors in the function model. evaluate, and I guess a custom evaluate function is required. Can you please share the custom evaluate function if any?
File "train_my_model.py", line 80, in train_model
loss, acc, sen, spe, F1 = our_model.evaluate(x=[test_X, test_Y], y=test_label, batch_size=1)
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training.py", line 1105, in evaluate
batch_size=batch_size)
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training.py", line 792, in _standardize_user_data
exception_prefix='target')
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training_utils.py", line 100, in standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 2 arrays: [array([[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0....
The text was updated successfully, but these errors were encountered:
Hi, we didn't use any custom evaluation function. In your illustrated code, "our_model.evaluate()" is the built-in function of Keras. And according to your errors that say "Expected to see 1 array(s), but instead got the following list of 2 arrays", we think it could be caused by the dimension inconsistency between your given label and the network prediction result.
Hi Authors,
I am getting errors in the function model. evaluate, and I guess a custom evaluate function is required. Can you please share the custom evaluate function if any?
File "train_my_model.py", line 80, in train_model
loss, acc, sen, spe, F1 = our_model.evaluate(x=[test_X, test_Y], y=test_label, batch_size=1)
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training.py", line 1105, in evaluate
batch_size=batch_size)
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training.py", line 792, in _standardize_user_data
exception_prefix='target')
File "C:\Users\hp.conda\envs\ChangeDetection\lib\site-packages\keras\engine\training_utils.py", line 100, in standardize_input_data
str(len(data)) + ' arrays: ' + str(data)[:200] + '...')
ValueError: Error when checking model target: the list of Numpy arrays that you are passing to your model is not the size the model expected. Expected to see 1 array(s), but instead got the following list of 2 arrays: [array([[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0.],
...,
[0., 0., 0., ..., 0., 0., 0.],
[0., 0., 0., ..., 0., 0., 0....
The text was updated successfully, but these errors were encountered: