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
93cdbaf5
Commit
93cdbaf5
authored
May 21, 2021
by
stephenwu
Browse files
fixed minor changes
parent
e748d785
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
12 deletions
+5
-12
official/nlp/finetuning/binary_helper.py
official/nlp/finetuning/binary_helper.py
+2
-9
official/nlp/finetuning/superglue/flags.py
official/nlp/finetuning/superglue/flags.py
+3
-3
No files found.
official/nlp/finetuning/binary_helper.py
View file @
93cdbaf5
...
...
@@ -315,9 +315,7 @@ def write_superglue_classification(task,
predict_batch_size
,
seq_length
,
class_names
,
label_type
=
'int'
,
min_float_value
=
None
,
max_float_value
=
None
):
label_type
=
'int'
):
"""Makes classification predictions for superglue and writes to output file.
Args:
...
...
@@ -329,12 +327,7 @@ def write_superglue_classification(task,
seq_length: Input sequence length.
class_names: List of string class names.
label_type: String denoting label type ('int', 'float'), defaults to 'int'.
min_float_value: If set, predictions will be min-clipped to this value (only
for regression when `label_type` is set to 'float'). Defaults to `None`
(no clipping).
max_float_value: If set, predictions will be max-clipped to this value (only
for regression when `label_type` is set to 'float'). Defaults to `None`
(no clipping).
"""
if
label_type
not
in
(
'int'
):
raise
ValueError
(
'Unsupported `label_type`. Given: %s, expected `int` or '
...
...
official/nlp/finetuning/superglue/flags.py
View file @
93cdbaf5
...
...
@@ -12,7 +12,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
"""Common flags for GLUE finetuning binary."""
"""Common flags for
Super
GLUE finetuning binary."""
from
typing
import
Callable
from
absl
import
flags
...
...
@@ -23,7 +23,7 @@ def define_flags():
"""Defines flags."""
# ===========================================================================
# Glue binary flags.
#
Super
Glue binary flags.
# ===========================================================================
flags
.
DEFINE_enum
(
'mode'
,
'train_eval_and_predict'
,
...
...
@@ -38,7 +38,7 @@ def define_flags():
flags
.
DEFINE_enum
(
'task_name'
,
None
,
[
'AX-b'
,
'CB'
,
'COPA'
,
'MULTIRC'
,
'RTE'
,
'WiC'
,
'WSC'
,
'BoolQ'
,
'ReCoRD'
,
'AX-g'
,
],
'The type of GLUE task.'
)
],
'The type of
Super
GLUE task.'
)
flags
.
DEFINE_string
(
'train_input_path'
,
None
,
'The file path to the training data.'
)
...
...
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