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
ModelZoo
LPRNet_pytorch
Commits
5cc1165a
Commit
5cc1165a
authored
Mar 16, 2023
by
liuhy
Browse files
修改train.py
parent
c9d96a6a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
6 deletions
+6
-6
__pycache__/load_data.cpython-37.pyc
__pycache__/load_data.cpython-37.pyc
+0
-0
__pycache__/lprnet.cpython-37.pyc
__pycache__/lprnet.cpython-37.pyc
+0
-0
train.py
train.py
+6
-6
No files found.
__pycache__/load_data.cpython-37.pyc
0 → 100644
View file @
5cc1165a
File added
__pycache__/lprnet.cpython-37.pyc
0 → 100644
View file @
5cc1165a
File added
train.py
View file @
5cc1165a
...
@@ -221,15 +221,15 @@ def train(args):
...
@@ -221,15 +221,15 @@ def train(args):
def
get_parser
():
def
get_parser
():
parser
=
argparse
.
ArgumentParser
(
description
=
'parameters to train net'
)
parser
=
argparse
.
ArgumentParser
(
description
=
'parameters to train net'
)
parser
.
add_argument
(
'--max_epoch'
,
default
=
15
,
help
=
'epoch to train the network'
)
parser
.
add_argument
(
'--max_epoch'
,
default
=
15
,
type
=
int
,
help
=
'epoch to train the network'
)
parser
.
add_argument
(
'--img_size'
,
default
=
[
94
,
24
],
help
=
'the image size'
)
parser
.
add_argument
(
'--img_size'
,
default
=
[
94
,
24
],
help
=
'the image size'
)
parser
.
add_argument
(
'--train_img_dirs'
,
default
=
"data/train"
,
help
=
'the train images path'
)
parser
.
add_argument
(
'--train_img_dirs'
,
default
=
"data/train"
,
help
=
'the train images path'
)
parser
.
add_argument
(
'--test_img_dirs'
,
default
=
"imgs"
,
help
=
'the test images path'
)
parser
.
add_argument
(
'--test_img_dirs'
,
default
=
"imgs"
,
help
=
'the test images path'
)
parser
.
add_argument
(
'--dropout_rate'
,
default
=
0.5
,
help
=
'dropout rate.'
)
parser
.
add_argument
(
'--dropout_rate'
,
default
=
0.5
,
type
=
float
,
help
=
'dropout rate.'
)
parser
.
add_argument
(
'--learning_rate'
,
default
=
0.1
,
help
=
'base value of learning rate.'
)
parser
.
add_argument
(
'--learning_rate'
,
default
=
0.1
,
type
=
float
,
help
=
'base value of learning rate.'
)
parser
.
add_argument
(
'--lpr_max_len'
,
default
=
8
,
help
=
'license plate number max length.'
)
parser
.
add_argument
(
'--lpr_max_len'
,
default
=
8
,
type
=
int
,
help
=
'license plate number max length.'
)
parser
.
add_argument
(
'--train_batch_size'
,
default
=
64
,
help
=
'training batch size.'
)
parser
.
add_argument
(
'--train_batch_size'
,
default
=
64
,
type
=
int
,
help
=
'training batch size.'
)
parser
.
add_argument
(
'--test_batch_size'
,
default
=
10
,
help
=
'testing batch size.'
)
parser
.
add_argument
(
'--test_batch_size'
,
default
=
10
,
type
=
int
,
help
=
'testing batch size.'
)
parser
.
add_argument
(
'--phase_train'
,
default
=
True
,
type
=
bool
,
help
=
'train or test phase flag.'
)
parser
.
add_argument
(
'--phase_train'
,
default
=
True
,
type
=
bool
,
help
=
'train or test phase flag.'
)
parser
.
add_argument
(
'--num_workers'
,
default
=
8
,
type
=
int
,
help
=
'Number of workers used in dataloading'
)
parser
.
add_argument
(
'--num_workers'
,
default
=
8
,
type
=
int
,
help
=
'Number of workers used in dataloading'
)
parser
.
add_argument
(
'--cuda'
,
default
=
True
,
type
=
bool
,
help
=
'Use cuda to train model'
)
parser
.
add_argument
(
'--cuda'
,
default
=
True
,
type
=
bool
,
help
=
'Use cuda to train model'
)
...
...
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