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
296d0d3f
"git@developer.sourcefind.cn:modelzoo/resnet50_tensorflow.git" did not exist on "2e77bb3eed670ce133984b110b740294daca44ee"
Commit
296d0d3f
authored
Jul 18, 2019
by
guptapriya
Browse files
Unskip tests with 1.x
parent
3a796b5a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
5 deletions
+2
-5
official/transformer/v2/transformer_main_test.py
official/transformer/v2/transformer_main_test.py
+2
-5
No files found.
official/transformer/v2/transformer_main_test.py
View file @
296d0d3f
...
@@ -79,25 +79,23 @@ class TransformerTaskTest(tf.test.TestCase):
...
@@ -79,25 +79,23 @@ class TransformerTaskTest(tf.test.TestCase):
def
_assert_exists
(
self
,
filepath
):
def
_assert_exists
(
self
,
filepath
):
self
.
assertTrue
(
os
.
path
.
exists
(
filepath
))
self
.
assertTrue
(
os
.
path
.
exists
(
filepath
))
def
test_train
(
self
):
def
test_train
_no_dist_strat
(
self
):
t
=
tm
.
TransformerTask
(
FLAGS
)
t
=
tm
.
TransformerTask
(
FLAGS
)
t
.
train
()
t
.
train
()
@
unittest
.
skipUnless
(
keras_utils
.
is_v2_0
(),
'TF 2.0 only test.'
)
def
test_train_static_batch
(
self
):
def
test_train_static_batch
(
self
):
FLAGS
.
distribution_strategy
=
'one_device'
FLAGS
.
static_batch
=
True
FLAGS
.
static_batch
=
True
t
=
tm
.
TransformerTask
(
FLAGS
)
t
=
tm
.
TransformerTask
(
FLAGS
)
t
.
train
()
t
.
train
()
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
keras_utils
.
is_v2_0
(),
'TF 2.0 only test.'
)
def
test_train_1_gpu_with_dist_strat
(
self
):
def
test_train_1_gpu_with_dist_strat
(
self
):
FLAGS
.
distribution_strategy
=
'one_device'
FLAGS
.
distribution_strategy
=
'one_device'
t
=
tm
.
TransformerTask
(
FLAGS
)
t
=
tm
.
TransformerTask
(
FLAGS
)
t
.
train
()
t
.
train
()
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
keras_utils
.
is_v2_0
(),
'TF 2.0 only test.'
)
def
test_train_2_gpu
(
self
):
def
test_train_2_gpu
(
self
):
if
context
.
num_gpus
()
<
2
:
if
context
.
num_gpus
()
<
2
:
self
.
skipTest
(
self
.
skipTest
(
...
@@ -110,7 +108,6 @@ class TransformerTaskTest(tf.test.TestCase):
...
@@ -110,7 +108,6 @@ class TransformerTaskTest(tf.test.TestCase):
t
.
train
()
t
.
train
()
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
tf
.
test
.
is_built_with_cuda
(),
'requires GPU'
)
@
unittest
.
skipUnless
(
keras_utils
.
is_v2_0
(),
'TF 2.0 only test.'
)
def
test_train_2_gpu_fp16
(
self
):
def
test_train_2_gpu_fp16
(
self
):
if
context
.
num_gpus
()
<
2
:
if
context
.
num_gpus
()
<
2
:
self
.
skipTest
(
self
.
skipTest
(
...
...
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