(length, maxlen=None, dtype=tf.bool)
return mask
convert length to masking flag
convert length to masking flag
convert length to masking flag
def len_to_mask(length, maxlen=None, dtype=tf.bool):
  ''' convert length to masking flag '''
  # (B) -> (B, T)
  mask = tf.sequence_mask(length, maxlen=maxlen, dtype=dtype)
  return mask
def len_to_mask ( length , maxlen = None , dtype = tf . bool ) : # (B) -> (B, T) mask = tf . sequence_mask ( length , maxlen = maxlen , dtype = dtype ) return mask