keras icon indicating copy to clipboard operation
keras copied to clipboard

[BUG] Conflicting loss_weights implementation in Keras3 for single output case.

Open YUHSINCHENG1230 opened this issue 1 year ago • 3 comments

Description when I trainnig a U-net model (Multiple class) with keras 3, in model.fit() step it have this probelm.

ValueError: When there is only a single output, the loss_weights argument must be a Python float. Received instead: loss_weights=[, ] of type.

but in karas 2 it run successfully. (same code)

Can anyone help me to solve this problem?

YUHSINCHENG1230 avatar May 31 '24 01:05 YUHSINCHENG1230

@YUHSINCHENG1230, Could you please share reproducible code?

chunduriv avatar May 31 '24 16:05 chunduriv

I think I found the poblem and I solve it. but i have some question , why the result is not same in keras2 and 3?(same code)

YUHSINCHENG1230 avatar Jun 03 '24 04:06 YUHSINCHENG1230

Hi @YUHSINCHENG1230 , would you be able to provide reproducible code? It would helps us answer your question, thanks!

nkovela1 avatar Jun 13 '24 15:06 nkovela1

This issue is stale because it has been open for 14 days with no activity. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar Dec 27 '24 02:12 github-actions[bot]

This issue was closed because it has been inactive for 28 days. Please reopen if you'd like to work on this further.

github-actions[bot] avatar Jan 10 '25 02:01 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar Jan 10 '25 02:01 google-ml-butler[bot]