Commit 965e1ff3 authored by Paul Primus's avatar Paul Primus
Browse files

add rerun script

parent 10f6e5b5
......@@ -140,6 +140,8 @@ class MachineDataSet(torch.utils.data.Dataset):
files = sorted(files)
self.files = files
self.file_length = self.__load_preprocess_file__(files[0]).shape[-1]
files = sorted(files)
self.files = files
self.meta_data = self.__load_meta_data__(files)
......@@ -177,7 +179,7 @@ class MachineDataSet(torch.utils.data.Dataset):
return data
def __load_data__(self, files):
file_name = "{}_{}_{}_{}_{}_{}_{}_{}_{}_{}.npz".format(
file_name = "{}_{}_{}_{}_{}_{}_{}_{}_{}_{}_tmp.npz".format(
self.num_mel,
self.n_fft,
self.hop_size,
......@@ -202,8 +204,12 @@ 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):
......
This diff is collapsed.
conda activate dcase2020_task2
OMP_NUM_THREADS=1 CUDA_VISIBLE_DEVICES=0 python -m dcase2020_task2.experiments.$1 with num_workers=4 machine_type=3 machine_id=5 $2 > /dev/null 2>&1 &
OMP_NUM_THREADS=1 CUDA_VISIBLE_DEVICES=1 python -m dcase2020_task2.experiments.$1 with num_workers=4 machine_type=3 machine_id=7 $2 > /dev/null 2>&1 &
OMP_NUM_THREADS=1 CUDA_VISIBLE_DEVICES=2 python -m dcase2020_task2.experiments.$1 with num_workers=4 machine_type=4 machine_id=5 $2 > /dev/null 2>&1 &
wait
\ No newline at end of file
epochs=100
valid_types=loose
for loss_class in AUC BCE
do
for learning_rate in 1e-4 1e-5
do
for rf in a_bit_larger normal a_bit_smaller
do
./scripts/per_id_run_parallel_re_run.sh classification_experiment "id=resnet_gridsearch_${rf}_${valid_types}_${learning_rate}_${epochs}_${loss_class}_rerun learning_rate=$learning_rate epochs=$epochs rf=$rf valid_types=$valid_types loss_class=dcase2020_task2.losses.$loss_class -m student2.cp.jku.at:27017:resnet_gridsearch"
done
done
done
\ No newline at end of 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