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
4627f55d
Commit
4627f55d
authored
Oct 05, 2021
by
Jialu Liu
Committed by
A. Unique TensorFlower
Oct 05, 2021
Browse files
Internal change
PiperOrigin-RevId: 401000583
parent
7bb4d442
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
6 deletions
+2
-6
official/nlp/modeling/networks/packed_sequence_embedding.py
official/nlp/modeling/networks/packed_sequence_embedding.py
+2
-6
No files found.
official/nlp/modeling/networks/packed_sequence_embedding.py
View file @
4627f55d
...
@@ -82,15 +82,11 @@ class PackedSequenceEmbedding(tf.keras.Model):
...
@@ -82,15 +82,11 @@ class PackedSequenceEmbedding(tf.keras.Model):
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'input_mask'
)
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'input_mask'
)
type_ids
=
tf
.
keras
.
layers
.
Input
(
type_ids
=
tf
.
keras
.
layers
.
Input
(
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'input_type_ids'
)
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'input_type_ids'
)
inputs
=
{
inputs
=
[
word_ids
,
mask
,
type_ids
]
'input_word_ids'
:
word_ids
,
'input_mask'
:
mask
,
'input_type_ids'
:
type_ids
,
}
if
use_position_id
:
if
use_position_id
:
position_ids
=
tf
.
keras
.
layers
.
Input
(
position_ids
=
tf
.
keras
.
layers
.
Input
(
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'position_ids'
)
shape
=
(
None
,),
dtype
=
tf
.
int32
,
name
=
'position_ids'
)
inputs
[
'position_ids'
]
=
position_ids
inputs
.
append
(
position_ids
)
else
:
else
:
position_ids
=
None
position_ids
=
None
...
...
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