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
c83f3256
Commit
c83f3256
authored
Aug 11, 2020
by
Chen Chen
Committed by
A. Unique TensorFlower
Aug 11, 2020
Browse files
Internal change
PiperOrigin-RevId: 326068206
parent
878f6caf
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
1 deletion
+2
-1
official/nlp/tasks/sentence_prediction.py
official/nlp/tasks/sentence_prediction.py
+2
-1
No files found.
official/nlp/tasks/sentence_prediction.py
View file @
c83f3256
...
@@ -27,6 +27,7 @@ import tensorflow_hub as hub
...
@@ -27,6 +27,7 @@ import tensorflow_hub as hub
from
official.core
import
base_task
from
official.core
import
base_task
from
official.core
import
task_factory
from
official.core
import
task_factory
from
official.modeling
import
tf_utils
from
official.modeling.hyperparams
import
base_config
from
official.modeling.hyperparams
import
base_config
from
official.modeling.hyperparams
import
config_definitions
as
cfg
from
official.modeling.hyperparams
import
config_definitions
as
cfg
from
official.nlp.configs
import
encoders
from
official.nlp.configs
import
encoders
...
@@ -103,7 +104,7 @@ class SentencePredictionTask(base_task.Task):
...
@@ -103,7 +104,7 @@ class SentencePredictionTask(base_task.Task):
if
aux_losses
:
if
aux_losses
:
loss
+=
tf
.
add_n
(
aux_losses
)
loss
+=
tf
.
add_n
(
aux_losses
)
return
tf
.
reduc
e_mean
(
loss
)
return
tf
_utils
.
saf
e_mean
(
loss
)
def
build_inputs
(
self
,
params
,
input_context
=
None
):
def
build_inputs
(
self
,
params
,
input_context
=
None
):
"""Returns tf.data.Dataset for sentence_prediction task."""
"""Returns tf.data.Dataset for sentence_prediction task."""
...
...
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