You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 1a6729e
Browse filesBrowse the repository at this point in the historyBrowse files
Copy file name to clipboardExpand all lines: examples/machine_translation/transformer/static/train.py
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -60,6 +60,28 @@ def parse_args():
60
60
type=str,
61
61
help="The files for validation, including [source language file, target language file]. Normally, it shouldn't be set and in this case, the default WMT14 dataset will be used to do validation. "
62
62
)
63
+
parser.add_argument(
64
+
"--vocab_file",
65
+
default=None,
66
+
type=str,
67
+
help="The vocab file. Normally, it shouldn't be set and in this case, the default WMT14 dataset will be used."
68
+
)
69
+
parser.add_argument(
70
+
"--unk_token",
71
+
default=None,
72
+
type=str,
73
+
help="The unknown token. It should be provided when use custom vocab_file. "
74
+
)
75
+
parser.add_argument(
76
+
"--bos_token",
77
+
default=None,
78
+
type=str,
79
+
help="The bos token. It should be provided when use custom vocab_file. ")
80
+
parser.add_argument(
81
+
"--eos_token",
82
+
default=None,
83
+
type=str,
84
+
help="The eos token. It should be provided when use custom vocab_file. ")
Copy file name to clipboardExpand all lines: examples/machine_translation/transformer/train.py
+26Lines changed: 26 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -48,6 +48,28 @@ def parse_args():
48
48
type=str,
49
49
help="The files for validation, including [source language file, target language file]. Normally, it shouldn't be set and in this case, the default WMT14 dataset will be used to do validation. "
50
50
)
51
+
parser.add_argument(
52
+
"--vocab_file",
53
+
default=None,
54
+
type=str,
55
+
help="The vocab file. Normally, it shouldn't be set and in this case, the default WMT14 dataset will be used."
56
+
)
57
+
parser.add_argument(
58
+
"--unk_token",
59
+
default=None,
60
+
type=str,
61
+
help="The unknown token. It should be provided when use custom vocab_file. "
62
+
)
63
+
parser.add_argument(
64
+
"--bos_token",
65
+
default=None,
66
+
type=str,
67
+
help="The bos token. It should be provided when use custom vocab_file. ")
68
+
parser.add_argument(
69
+
"--eos_token",
70
+
default=None,
71
+
type=str,
72
+
help="The eos token. It should be provided when use custom vocab_file. ")
0 commit comments