Open ethanyxfang opened 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())
end_mask = K.cast(K.greater(mask, self.shift_left(mask)), K.floatx())
cc @lzfelix
I found the same error
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())