osl_dynamics.data.tf.n_batches#

osl_dynamics.data.tf.n_batches(n_sequences, batch_size, drop_last_batch=False)#

Number of batches a set of sequences is split into.

Parameters:
n_sequencesint

Number of sequences.

batch_sizeint

Number sequences in each mini-batch.

drop_last_batchbool, optional

Should we drop the last batch if it is smaller than the batch size?

Returns:
n_batchesint

Number of batches.