braindecode.functional.patch_count#

braindecode.functional.patch_count(n_times, patch_size, on_non_divisible='pad', step=0)[source]#

Number of patches cut from n_times samples.

Parameters:
  • n_times (int) – Length of the axis that is patched.

  • patch_size (int) – Samples per patch.

  • on_non_divisible (str) – A last, incomplete patch is zero-padded ("pad"), dropped ("crop") or raises a ValueError.

  • step (int) – Distance between patch starts; 0 means patch_size (non-overlapping).

Returns:

Number of patches.

Return type:

int