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, ...]
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
def cqt_slicer(cqt, idx, counter, t_len): obs = utils.slice_ndarray(cqt, idx[counter], length=t_len, axis=1) return obs[np.newaxis, ...]