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
ResNet50_tensorflow
Commits
0dc9a20a
"torchvision/csrc/vscode:/vscode.git/clone" did not exist on "52b8685bde554501604471337a11578fdf026027"
Commit
0dc9a20a
authored
Sep 30, 2020
by
Allen Wang
Committed by
A. Unique TensorFlower
Sep 30, 2020
Browse files
Fix XLNet Classifier.
PiperOrigin-RevId: 334642892
parent
79354e14
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
2 deletions
+2
-2
official/nlp/xlnet/classifier_utils.py
official/nlp/xlnet/classifier_utils.py
+1
-1
official/nlp/xlnet/run_classifier.py
official/nlp/xlnet/run_classifier.py
+1
-1
No files found.
official/nlp/xlnet/classifier_utils.py
View file @
0dc9a20a
...
...
@@ -153,7 +153,7 @@ def convert_single_example(example_index, example, label_list, max_seq_length,
logging
.
info
(
"input_ids: %s"
,
" "
.
join
([
str
(
x
)
for
x
in
input_ids
]))
logging
.
info
(
"input_mask: %s"
,
" "
.
join
([
str
(
x
)
for
x
in
input_mask
]))
logging
.
info
(
"segment_ids: %s"
,
" "
.
join
([
str
(
x
)
for
x
in
segment_ids
]))
logging
.
info
(
"label: %
d
(id = %d)"
,
example
.
label
,
label_id
)
logging
.
info
(
"label: %
s
(id = %d)"
,
example
.
label
,
label_id
)
feature
=
InputFeatures
(
input_ids
=
input_ids
,
...
...
official/nlp/xlnet/run_classifier.py
View file @
0dc9a20a
...
...
@@ -155,7 +155,7 @@ def main(unused_argv):
adam_epsilon
=
FLAGS
.
adam_epsilon
)
model_config
=
xlnet_config
.
XLNetConfig
(
FLAGS
)
run_config
=
xlnet_config
.
create_run_config
(
True
,
False
,
FLAGS
)
model_fn
=
functools
.
partial
(
modeling
.
classification_model
,
model_config
,
model_fn
=
functools
.
partial
(
get_
classification
xlnet
_model
,
model_config
,
run_config
,
FLAGS
.
n_class
,
FLAGS
.
summary_type
)
input_meta_data
=
{}
input_meta_data
[
"d_model"
]
=
FLAGS
.
d_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