Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Paul Primus
dcase2020_task2
Commits
965e1ff3
Commit
965e1ff3
authored
Jun 15, 2020
by
Paul Primus
Browse files
add rerun script
parent
10f6e5b5
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
dcase2020_task2/data_sets/mcm_dataset.py
View file @
965e1ff3
...
...
@@ -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
):
...
...
notebooks/create_bar_plot.ipynb
View file @
965e1ff3
This diff is collapsed.
Click to expand it.
scripts/per_id_run_parallel_re_run.sh
0 → 100755
View file @
965e1ff3
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
scripts/resnet_grid_search/gs_rerun_rk_0.sh
0 → 100755
View file @
965e1ff3
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment