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

Dimensions must be equal #17

Open
zhaoloulou opened this issue Jun 4, 2024 · 0 comments
Open

Dimensions must be equal #17

zhaoloulou opened this issue Jun 4, 2024 · 0 comments

Comments

@zhaoloulou
Copy link

File "D:\360安全浏览器下载\heatmap-main\heatmap-main\ResUNetPlusPlus\run.py", line 81, in
model.fit(train_gen, #_generator
File "D:\360安全浏览器下载\heatmap-main\venv\Lib\site-packages\keras\src\utils\traceback_utils.py", line 122, in error_handler
raise e.with_traceback(filtered_tb) from None
File "D:\360安全浏览器下载\heatmap-main\heatmap-main\ResUNetPlusPlus\metrics.py", line 16, in dice_loss
return 1.0 - dice_coef(y_true, y_pred)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\360安全浏览器下载\heatmap-main\heatmap-main\ResUNetPlusPlus\metrics.py", line 11, in dice_coef
intersection = tf.reduce_sum(y_true_f * y_pred_f)
~~~~~~~~~^~~~~~~~~~
ValueError: Dimensions must be equal, but are 196608 and 65536 for '{{node compile_loss/dice_loss/mul}} = Mul[T=DT_FLOAT](compile_loss/dice_loss/flatten_8_1/Reshape, compile_loss/dice_loss/flatten_9_1/Reshape)' with input shapes: [?,196608], [?,65536].

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

1 participant