Skip to content

Dimensions must be equal #17

Description

@zhaoloulou

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].

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions