File "/usr/local/lib/python3.10/dist-packages/keras/engine/training.py", line 1284, in train_function *
return step_function(self, iterator)
File "<ipython-input-41-259b4a3fa215>", line 3, in weighted_binary_crossentropy *
loss = - (y_true * K.log(y_pred) * 0.90 + (1 - y_true) * K.log(1 - y_pred) * 0.10)
TypeError: Input 'y' of 'Mul' Op has type float32 that does not match type uint8 of argument 'x'.
TypeError Traceback (most recent call last) in <cell line: 1>()
----> 1 model.fit(total_patch, total_mask, batch_size = 512, epochs = 40)
2 frames /tmp/__autograph_generated_filen463df7a.py in tfweighted_binary_crossentropy(y_true, ypred) 9 retval = ag__.UndefinedReturnValue() 10 y_pred = ag.converted_call(ag.ld(tf).clip_by_value, (ag.ld(y_pred), 1e-07, 1.0 - 1e-07), None, fscope) ---> 11 loss = -(ag.ld(y_true) * ag__.converted_call(ag.ld(K).log, (ag.ld(y_pred),), None, fscope) 0.9 + (1 - ag__.ld(y_true)) ag.converted_call(ag.ld(K).log, (1 - ag.ld(y_pred),), None, fscope) * 0.1) 12 try: 13 do_return = True
TypeError: in user code: