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
Gaëtan Caillaut
minibert-deft2018
Commits
bf61b8f8
Commit
bf61b8f8
authored
Mar 29, 2021
by
Gaëtan Caillaut
Browse files
depth and heighte CLI parameters
parent
da7fb2e8
Changes
1
Hide whitespace changes
Inline
Side-by-side
train.py
View file @
bf61b8f8
...
...
@@ -1308,6 +1308,9 @@ if __name__ == "__main__":
t1_parser
.
add_argument
(
"--bs"
,
type
=
int
,
default
=
128
)
t1_parser
.
add_argument
(
"-e"
,
"--epochs"
,
type
=
int
,
default
=
100
)
t1_parser
.
add_argument
(
"--height"
,
type
=
int
,
default
=
1
)
t1_parser
.
add_argument
(
"--depth"
,
type
=
int
,
default
=
1
)
t1_parser
.
add_argument
(
"--attention"
,
type
=
str
,
default
=
"self-attention"
)
t1_parser
.
add_argument
(
"--position"
,
type
=
str
,
default
=
"fixed"
)
t1_parser
.
add_argument
(
"--dont-normalize"
,
action
=
"store_true"
)
...
...
@@ -1333,6 +1336,9 @@ if __name__ == "__main__":
t1fs_parser
.
add_argument
(
"--bs"
,
type
=
int
,
default
=
128
)
t1fs_parser
.
add_argument
(
"-e"
,
"--epochs"
,
type
=
int
,
default
=
100
)
t1fs_parser
.
add_argument
(
"--height"
,
type
=
int
,
default
=
1
)
t1fs_parser
.
add_argument
(
"--depth"
,
type
=
int
,
default
=
1
)
t1fs_parser
.
add_argument
(
"--attention"
,
type
=
str
,
default
=
"self-attention"
)
t1fs_parser
.
add_argument
(
"--position"
,
type
=
str
,
default
=
"fixed"
)
t1fs_parser
.
add_argument
(
"--dont-normalize"
,
action
=
"store_true"
)
...
...
@@ -1344,6 +1350,7 @@ if __name__ == "__main__":
t1fs_parser
.
add_argument
(
"--epochs-between-save"
,
default
=
10
,
type
=
int
)
t1fs_parser
.
add_argument
(
"--show-progress"
,
default
=
50
,
type
=
int
)
t1fs_parser
.
add_argument
(
"--sample"
,
action
=
"store_true"
)
t1fs_parser
.
set_defaults
(
freeze_attention
=
False
)
t1fs_parser
.
set_defaults
(
func
=
t1_from_scratch
)
t2_parser
=
subparsers
.
add_parser
(
"t2"
)
...
...
@@ -1358,6 +1365,9 @@ if __name__ == "__main__":
t2_parser
.
add_argument
(
"--bs"
,
type
=
int
,
default
=
128
)
t2_parser
.
add_argument
(
"-e"
,
"--epochs"
,
type
=
int
,
default
=
100
)
t2_parser
.
add_argument
(
"--height"
,
type
=
int
,
default
=
1
)
t2_parser
.
add_argument
(
"--depth"
,
type
=
int
,
default
=
1
)
t2_parser
.
add_argument
(
"--attention"
,
type
=
str
,
default
=
"self-attention"
)
t2_parser
.
add_argument
(
"--position"
,
type
=
str
,
default
=
"fixed"
)
t2_parser
.
add_argument
(
"--dont-normalize"
,
action
=
"store_true"
)
...
...
@@ -1383,6 +1393,9 @@ if __name__ == "__main__":
t2fs_parser
.
add_argument
(
"--bs"
,
type
=
int
,
default
=
128
)
t2fs_parser
.
add_argument
(
"-e"
,
"--epochs"
,
type
=
int
,
default
=
100
)
t2fs_parser
.
add_argument
(
"--height"
,
type
=
int
,
default
=
1
)
t2fs_parser
.
add_argument
(
"--depth"
,
type
=
int
,
default
=
1
)
t2fs_parser
.
add_argument
(
"--attention"
,
type
=
str
,
default
=
"self-attention"
)
t2fs_parser
.
add_argument
(
"--position"
,
type
=
str
,
default
=
"fixed"
)
t2fs_parser
.
add_argument
(
"--dont-normalize"
,
action
=
"store_true"
)
...
...
@@ -1394,6 +1407,7 @@ if __name__ == "__main__":
t2fs_parser
.
add_argument
(
"--epochs-between-save"
,
default
=
10
,
type
=
int
)
t2fs_parser
.
add_argument
(
"--show-progress"
,
default
=
50
,
type
=
int
)
t2fs_parser
.
add_argument
(
"--sample"
,
action
=
"store_true"
)
t2fs_parser
.
set_defaults
(
freeze_attention
=
False
)
t2fs_parser
.
set_defaults
(
func
=
t2_from_scratch
)
cam_t1_parser
=
subparsers
.
add_parser
(
"camembert-t1"
)
...
...
Write
Preview
Supports
Markdown
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