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
nni
Commits
5e01504d
".github/vscode:/vscode.git/clone" did not exist on "cdc5d8d390377efa7f6d135bcbf9d74b09a14fbf"
Commit
5e01504d
authored
Sep 14, 2018
by
Sinan Tan
Committed by
xuehui
Sep 14, 2018
Browse files
Bugfix for SQuAD QA model.
parent
c6683d10
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
4 deletions
+2
-4
examples/trials/ga_squad/train_model.py
examples/trials/ga_squad/train_model.py
+1
-1
examples/trials/ga_squad/trial.py
examples/trials/ga_squad/trial.py
+1
-3
No files found.
examples/trials/ga_squad/train_model.py
View file @
5e01504d
...
...
@@ -37,7 +37,7 @@ class GAGConfig:
self
.
dropout
=
0.1
self
.
char_vcb_size
=
1
371
self
.
char_vcb_size
=
1
500
self
.
max_char_length
=
20
self
.
char_embed_dim
=
100
...
...
examples/trials/ga_squad/trial.py
View file @
5e01504d
...
...
@@ -58,7 +58,7 @@ def get_config():
default
=
'./glove.840B.300d.txt'
,
help
=
'dev file'
)
parser
.
add_argument
(
'--root_path'
,
default
=
'./data/'
,
type
=
str
,
help
=
'Root path of models'
)
parser
.
add_argument
(
'--batch_size'
,
type
=
int
,
default
=
2
,
help
=
'batch size'
)
parser
.
add_argument
(
'--batch_size'
,
type
=
int
,
default
=
64
,
help
=
'batch size'
)
parser
.
add_argument
(
'--save_path'
,
type
=
str
,
default
=
'./save'
,
help
=
'save path dir'
)
parser
.
add_argument
(
'--learning_rate'
,
type
=
float
,
default
=
0.0001
,
...
...
@@ -241,8 +241,6 @@ def run_epoch(batches, answer_net, is_training):
if
count
%
100
==
0
:
logger
.
debug
(
'%d %g except:%g'
%
(
count
,
used
,
used
/
count
*
len
(
batches
)))
if
count
%
100
==
0
:
break
loss
=
loss_sum
/
len
(
batches
)
if
is_training
:
return
loss
...
...
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