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
3a796b5a
Commit
3a796b5a
authored
Jul 18, 2019
by
guptapriya
Browse files
Remove loss layer test
parent
67f81649
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
10 deletions
+0
-10
official/transformer/v2/transformer_layers_test.py
official/transformer/v2/transformer_layers_test.py
+0
-10
No files found.
official/transformer/v2/transformer_layers_test.py
View file @
3a796b5a
...
...
@@ -77,16 +77,6 @@ class TransformerLayersTest(tf.test.TestCase):
output_logits
=
metrics
.
MetricLayer
(
vocab_size
)([
logits
,
targets
])
self
.
assertEqual
(
output_logits
.
shape
.
as_list
(),
[
None
,
None
,
vocab_size
,])
def
test_loss_layer
(
self
):
vocab_size
,
label_smoothing
=
50
,
0.1
logits
=
tf
.
keras
.
layers
.
Input
((
None
,
vocab_size
),
dtype
=
"float32"
,
name
=
"logits"
)
targets
=
tf
.
keras
.
layers
.
Input
((
None
,),
dtype
=
"int64"
,
name
=
"targets"
)
output_logits
=
metrics
.
LossLayer
(
vocab_size
,
label_smoothing
)([
logits
,
targets
])
self
.
assertEqual
(
output_logits
.
shape
.
as_list
(),
[
None
,
None
,
vocab_size
,])
if
__name__
==
"__main__"
:
tf
.
test
.
main
()
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