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
c8b846bc
Commit
c8b846bc
authored
Jun 13, 2020
by
Paul Primus
Browse files
fix folder bug
parent
ed4ca1b9
Changes
1
Hide whitespace changes
Inline
Side-by-side
dcase2020_task2/experiments/experiment_base.py
View file @
c8b846bc
...
...
@@ -4,7 +4,7 @@ import torch
from
dcase2020_task2.experiments.parser
import
create_objects_from_config
import
copy
import
os
from
pathlib
import
Path
class
BaseExperiment
(
ABC
,
torch
.
nn
.
Module
):
...
...
@@ -16,8 +16,7 @@ class BaseExperiment(ABC, torch.nn.Module):
for
k
in
[
'machine_type'
,
'machine_id'
,
'trainer'
,
'data_set'
,
'log_path'
,
'batch_size'
,
'num_workers'
]:
assert
k
in
self
.
objects
if
not
os
.
path
.
exists
(
self
.
configuration_dict
[
'log_path'
]):
os
.
mkdir
(
self
.
configuration_dict
[
'log_path'
])
Path
(
self
.
configuration_dict
[
'log_path'
]).
mkdir
(
parents
=
True
,
exist_ok
=
True
)
if
self
.
objects
.
get
(
'deterministic'
):
torch
.
backends
.
cudnn
.
deterministic
=
True
...
...
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