Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
vision
Commits
a23f0158
Unverified
Commit
a23f0158
authored
Feb 01, 2023
by
Nicolas Hug
Committed by
GitHub
Feb 01, 2023
Browse files
Fix quantized classif reference - missing args (#7072)
parent
43df72f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
references/classification/train.py
references/classification/train.py
+4
-2
No files found.
references/classification/train.py
View file @
a23f0158
...
@@ -128,10 +128,12 @@ def load_data(traindir, valdir, args):
...
@@ -128,10 +128,12 @@ def load_data(traindir, valdir, args):
print
(
f
"Loading dataset_train from
{
cache_path
}
"
)
print
(
f
"Loading dataset_train from
{
cache_path
}
"
)
dataset
,
_
=
torch
.
load
(
cache_path
)
dataset
,
_
=
torch
.
load
(
cache_path
)
else
:
else
:
# We need a default value for the variables below because args may come
# from train_quantization.py which doesn't define them.
auto_augment_policy
=
getattr
(
args
,
"auto_augment"
,
None
)
auto_augment_policy
=
getattr
(
args
,
"auto_augment"
,
None
)
random_erase_prob
=
getattr
(
args
,
"random_erase"
,
0.0
)
random_erase_prob
=
getattr
(
args
,
"random_erase"
,
0.0
)
ra_magnitude
=
args
.
ra_magnitude
ra_magnitude
=
getattr
(
args
,
"
ra_magnitude
"
,
None
)
augmix_severity
=
args
.
augmix_severity
augmix_severity
=
getattr
(
args
,
"
augmix_severity
"
,
None
)
dataset
=
torchvision
.
datasets
.
ImageFolder
(
dataset
=
torchvision
.
datasets
.
ImageFolder
(
traindir
,
traindir
,
presets
.
ClassificationPresetTrain
(
presets
.
ClassificationPresetTrain
(
...
...
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