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
19e8cf91
Commit
19e8cf91
authored
Feb 01, 2021
by
stephenwu
Browse files
fixed spacing and removed dev set for AX-g
parent
f0d22061
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
official/nlp/data/classifier_data_lib.py
official/nlp/data/classifier_data_lib.py
+2
-6
No files found.
official/nlp/data/classifier_data_lib.py
View file @
19e8cf91
...
...
@@ -1277,12 +1277,7 @@ def convert_single_example(ex_index, example, label_list, max_seq_length,
return
feature
class
AXgProcessor
(
DataProcessor
):
"""Processor for the AX dataset (GLUE diagnostics dataset)."""
def
get_dev_examples
(
self
,
data_dir
):
"""See base class."""
return
self
.
_create_examples
(
self
.
_read_jsonl
(
os
.
path
.
join
(
data_dir
,
"dev.jsonl"
)),
"dev"
)
"""Processor for the AXg dataset (GLUE diagnostics dataset)."""
def
get_test_examples
(
self
,
data_dir
):
"""See base class."""
...
...
@@ -1309,6 +1304,7 @@ class AXgProcessor(DataProcessor):
examples
.
append
(
InputExample
(
guid
=
guid
,
text_a
=
text_a
,
text_b
=
text_b
,
label
=
label
))
return
examples
def
_read_jsonl
(
self
,
input_path
):
with
tf
.
io
.
gfile
.
GFile
(
input_path
,
"r"
)
as
f
:
lines
=
[]
...
...
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