(sen_lens)
return doc_lens
Count how many sentences in a document.
  inputs: [..., time_steps]
  doc_lens: [...]
Count how many sentences in a document.
  inputs: [..., time_steps]
  doc_lens: [...]
Count how many sentences in a document . inputs : [ ... time_steps ] doc_lens : [ ... ]
def compute_doc_lens(sen_lens):
  """
  Count how many sentences in a document.
  inputs: [..., time_steps]
  doc_lens: [...]
  """
  x_binary = tf.cast(tf.cast(sen_lens, tf.bool), tf.int32)
  doc_lens = tf.reduce_sum(x_binary, axis=-1)
  return doc_lens
def compute_doc_lens ( sen_lens ) : x_binary = tf . cast ( tf . cast ( sen_lens , tf . bool ) , tf . int32 ) doc_lens = tf . reduce_sum ( x_binary , axis = - 1 ) return doc_lens