liuwei16 / CSP

High-level Semantic Feature Detection: A New Perspective for Pedestrian Detection, CVPR, 2019
753 stars 191 forks source link

Classification loss - binary_crossentropy (possibly wrong parameters order) #87

Closed zcikojevic closed 4 years ago

zcikojevic commented 4 years ago

https://github.com/liuwei16/CSP/blob/785bc4c5f956860116d8d51754fd76202afe4bcb/keras_csp/losses.py#L12

This is the signature of binary_crossentropy function:

tf.keras.backend.binary_crossentropy(
    target,
    output,
    from_logits=False
)

Should the order of input parameters be reversed, like so:

classification_loss = K.binary_crossentropy(y_true[:, :, :, 2], y_pred[:, :, :, 0]) 
zcikojevic commented 4 years ago

My mistake, didn't check parameters order for the Keras version authors specified.