Open vandeb69 opened 4 years ago
Dear, In the CRF class method add_boundary_energy, shouldn't https://github.com/keras-team/keras-contrib/blob/3fc5ef709e061416f4bc8a92ca3750c824b5d2b0/keras_contrib/layers/crf.py#L403 be replaced with: end_mask = K.cast(K.greater(mask, self.shift_left(mask)), K.floatx()) ?
CRF
add_boundary_energy
end_mask = K.cast(K.greater(mask, self.shift_left(mask)), K.floatx())
If mask is [[0., 1., 1., 1., 1., 0.]], end_mask would be [[1., 0., 0., 0., 0., 0.]] in stead of the intended [[0., 0., 0., 0., 1., 0.]]
mask
end_mask
https://github.com/tensorflow/addons/blob/master/tensorflow_addons/layers/crf.py#L184
Dear, In the
CRF
class methodadd_boundary_energy
, shouldn't https://github.com/keras-team/keras-contrib/blob/3fc5ef709e061416f4bc8a92ca3750c824b5d2b0/keras_contrib/layers/crf.py#L403 be replaced with:end_mask = K.cast(K.greater(mask, self.shift_left(mask)), K.floatx())
?If
mask
is [[0., 1., 1., 1., 1., 0.]],end_mask
would be [[1., 0., 0., 0., 0., 0.]] in stead of the intended [[0., 0., 0., 0., 1., 0.]]