Exemple #1
0
 def wcqt_slicer(cqt, idx, counter, t_len):
     # Grab the obs
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=1)
     # Convert it to WCQT
     wcqt = utils.fold_array(obs[0], length=p_len, stride=p_stride)
     # Fix the shape.s
     return wcqt[np.newaxis, ...]
Exemple #2
0
 def wcqt_slicer(cqt, idx, counter, t_len):
     # Grab the obs
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=1)
     # Convert it to WCQT
     wcqt = utils.fold_array(obs[0], length=p_len, stride=p_stride)
     # Fix the shape.s
     return wcqt[np.newaxis, ...]
Exemple #3
0
 def hcqt_slicer(cqt, idx, counter, t_len):
     # hcqt = np.swapaxes(cqt, 1, 2)
     # Grab the obs
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=-2)
     # Fix the shape.
     return obs[np.newaxis, ...] if np.ndim(obs) == 3 else obs
Exemple #4
0
 def cqt_slicer(cqt, idx, counter, t_len):
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=1)
     return obs[np.newaxis, ...]
Exemple #5
0
 def hcqt_slicer(cqt, idx, counter, t_len):
     # hcqt = np.swapaxes(cqt, 1, 2)
     # Grab the obs
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=-2)
     # Fix the shape.
     return obs[np.newaxis, ...] if np.ndim(obs) == 3 else obs
Exemple #6
0
 def cqt_slicer(cqt, idx, counter, t_len):
     obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=1)
     return obs[np.newaxis, ...]