def __init__(self, sampling_rate, duration=3, direction='random', shift_direction='random', name='Shift_Aug', verbose=0, stateless=True): super().__init__(action=Action.SUBSTITUTE, name=name, duration=duration, device='cpu', verbose=verbose, stateless=stateless) self.sampling_rate = sampling_rate self.direction = direction self.shift_direction = shift_direction self.model = nma.Shift() self.model.validate(shift_direction)
def get_model(cls, sampling_rate, shift_max, shift_direction): return nma.Shift(sampling_rate, shift_max, shift_direction)
def get_model(cls, sampling_rate, duration, direction): return nma.Shift(sampling_rate, duration, direction)