Skip to content
Snippets Groups Projects
Commit 64911fca authored by chinyun_yu_joey's avatar chinyun_yu_joey
Browse files

use 4 shifts

parent 9bd61e42
No related branches found
Tags submission-demucs-6
No related merge requests found
......@@ -12,14 +12,14 @@ def separate(
audio,
rate,
model,
shifts=5,
shifts=4,
device="cpu"
):
# convert numpy audio to torch
audio_torch = torch.tensor(audio.T).float().to(device)
max_shift = int(rate * 0.5)
batch_size = 4
batch_size = 3
valid_length = audio_torch.size(1)
padded_length = valid_length + max_shift
padded_audio = F.pad(audio_torch, [max_shift] * 2)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment