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
6b58625d
Commit
6b58625d
authored
Jan 07, 2020
by
Hongkun Yu
Committed by
A. Unique TensorFlower
Jan 07, 2020
Browse files
Remove TimeDistributed.
PiperOrigin-RevId: 288554071
parent
f3250a1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
official/nlp/modeling/networks/span_labeling.py
official/nlp/modeling/networks/span_labeling.py
+6
-8
No files found.
official/nlp/modeling/networks/span_labeling.py
View file @
6b58625d
...
@@ -57,14 +57,12 @@ class SpanLabeling(network.Network):
...
@@ -57,14 +57,12 @@ class SpanLabeling(network.Network):
sequence_data
=
tf
.
keras
.
layers
.
Input
(
sequence_data
=
tf
.
keras
.
layers
.
Input
(
shape
=
(
None
,
input_width
),
name
=
'sequence_data'
,
dtype
=
tf
.
float32
)
shape
=
(
None
,
input_width
),
name
=
'sequence_data'
,
dtype
=
tf
.
float32
)
time_distributed_dense
=
tf
.
keras
.
layers
.
TimeDistributed
(
intermediate_logits
=
tf
.
keras
.
layers
.
Dense
(
tf
.
keras
.
layers
.
Dense
(
2
,
# This layer predicts start location and end location.
2
,
# This layer predicts start location and end location.
activation
=
activation
,
activation
=
activation
,
kernel_initializer
=
initializer
,
kernel_initializer
=
initializer
,
name
=
'predictions/transform/logits'
)(
name
=
'predictions/transform/logits'
))
sequence_data
)
intermediate_logits
=
time_distributed_dense
(
sequence_data
)
self
.
start_logits
,
self
.
end_logits
=
(
self
.
start_logits
,
self
.
end_logits
=
(
tf
.
keras
.
layers
.
Lambda
(
self
.
_split_output_tensor
)(
intermediate_logits
))
tf
.
keras
.
layers
.
Lambda
(
self
.
_split_output_tensor
)(
intermediate_logits
))
...
...
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