Commit 142a57be authored by Paul Primus's avatar Paul Primus
Browse files

add rerun script

parent 965e1ff3
......@@ -179,7 +179,7 @@ class MachineDataSet(torch.utils.data.Dataset):
return data
def __load_data__(self, files):
file_name = "{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_tmp.npz".format(
file_name = "{}_{}_{}_{}_{}_{}_{}_{}_{}_{}.npz".format(
self.num_mel,
self.n_fft,
self.hop_size,
......@@ -204,12 +204,8 @@ class MachineDataSet(torch.utils.data.Dataset):
self.machine_id))
for i, f in enumerate(files):
file = self.__load_preprocess_file__(f)
if file.shape[-1] < self.file_length:
print(f'Too short {f}')
elif file.shape[-1] > self.file_length:
print(f'Too long {f}')
data.append(file)
# np.savez(file_path, *data)
np.savez(file_path, *data)
return data
def __load_preprocess_file__(self, file):
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment