keras-team / keras-contrib

Keras community contributions
MIT License
1.58k stars 651 forks source link

report bug in crf #508

Open ethanyxfang opened 5 years ago

ethanyxfang commented 5 years ago

In add_boundary_energy() with mask: https://github.com/keras-team/keras-contrib/blob/5ffab172661411218e517a50170bb97760ea567b/keras_contrib/layers/crf.py#L401-L405 In this way the right_boundary will never be involved in optimization. Is there a mistake in this calculation of end_mask? I think the correct calculation should be: end_mask = K.cast(K.greater(mask, self.shift_left(mask)), K.floatx())

touhi99 commented 5 years ago

cc @lzfelix

rtygbwwwerr commented 5 years ago

I found the same error