AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Binary cross entropy keras3/16/2024 ![]() You are using 圜rossentropy in the wrong way. ![]() I'm a bit confused, Keras always makes it so easy, I must omit something easy but I don't really get it. TypeError: unsupported operand type(s) for *: 'float' and 'Binar圜rossentropy' Users/axeldurand/opt/anaconda3/lib/python3.7/site-packages/tensorflow/python/keras/engine/training.py:806 train_function * I had tried previously : def custom_binary_crossentropy(y_true, y_pred): Used to reequilibrate the data, as there is more black (0., articles), than white (255., non-articles) on the pages.īut it returned : InvalidArgumentError: The second input must be a scalar, but it has shape Here's what I tried so far : import keras.backend as kbĭef custom_binary_crossentropy(y_true, y_pred): I tried to follow some topics about it, it doesn't seem to be very hard, but I get stuck in my implementation,i don't really know why.Įach time my implementations works on the compiling stage, but only in the fitting step it returns an error. In fact I get 1.8 times more "special" zones (0), than background zones (255), so I need to counterbalance this effect, and I'd like to penalize more the fact to make an error on the background, to avoid having a prediction of only special zones. My targets are binarized images (ranging 0-255), and I'd like to get some balancing between my two semantic classes (0 or 255). I'm creating a fully convolutional neural network, which given an image in input is capable to identify zones in it (black, 0), and also identify background (white, 255). ![]()
0 Comments
Read More
Leave a Reply. |