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
1464a721
Commit
1464a721
authored
Oct 05, 2017
by
Amit Patankar
Committed by
Neal Wu
Oct 05, 2017
Browse files
Official py3 testing. (#2499)
parent
5ddd7e55
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
7 deletions
+17
-7
official/resnet/cifar10_test.py
official/resnet/cifar10_test.py
+2
-2
official/resnet/imagenet_main.py
official/resnet/imagenet_main.py
+2
-2
official/testing/docker_test.sh
official/testing/docker_test.sh
+13
-3
No files found.
official/resnet/cifar10_test.py
View file @
1464a721
...
...
@@ -32,8 +32,8 @@ class BaseTest(tf.test.TestCase):
def
test_dataset_input_fn
(
self
):
fake_data
=
bytearray
()
fake_data
.
append
(
7
)
for
i
in
x
range
(
3
):
for
_
in
x
range
(
1024
):
for
i
in
range
(
3
):
for
_
in
range
(
1024
):
fake_data
.
append
(
i
)
_
,
filename
=
mkstemp
(
dir
=
self
.
get_temp_dir
())
...
...
official/resnet/imagenet_main.py
View file @
1464a721
...
...
@@ -90,11 +90,11 @@ def filenames(is_training):
if
is_training
:
return
[
os
.
path
.
join
(
FLAGS
.
data_dir
,
'train-%05d-of-01024'
%
i
)
for
i
in
x
range
(
0
,
1024
)]
for
i
in
range
(
0
,
1024
)]
else
:
return
[
os
.
path
.
join
(
FLAGS
.
data_dir
,
'validation-%05d-of-00128'
%
i
)
for
i
in
x
range
(
0
,
128
)]
for
i
in
range
(
0
,
128
)]
def
dataset_parser
(
value
,
is_training
):
...
...
official/testing/docker_test.sh
View file @
1464a721
...
...
@@ -22,6 +22,9 @@
# --docker-image flag), the default latest tensorflow docker
# will be used.
#
# The script obeys the following required environment variables unless superceded by
# the docker image flag:
# PYTHON_VERSION: (PYTHON2 | PYTHON3)
# SETUP
...
...
@@ -31,6 +34,16 @@ EXIT=0
# Get current directory path to mount
export
WORKSPACE
=
${
PWD
}
if
[
"
$PYTHON_VERSION
"
=
"PYTHON3"
]
;
then
DOCKER_IMG_NAME
=
"tensorflow/tensorflow:1.3.0-py3"
else
DOCKER_IMG_NAME
=
"tensorflow/tensorflow:1.3.0"
if
[
"
$PYTHON_VERSION
"
!=
"PYTHON2"
]
;
then
echo
"WARNING: Python version was not specified. Using Python2 by default."
sleep
5
fi
fi
DOCKER_BINARY
=
"docker"
# Decide docker image and tag
...
...
@@ -38,9 +51,6 @@ if [[ "$1" == "--docker-image" ]]; then
DOCKER_IMG_NAME
=
"
$2
"
echo
"Using specified docker tensorflow image and tag:
${
DOCKER_IMG_NAME
}
"
shift
2
else
DOCKER_IMG_NAME
=
"tensorflow/tensorflow:1.3.0"
echo
"Using the default docker tensorflow image and tag:
${
DOCKER_IMG_NAME
}
"
fi
# Specify which test is to be run
...
...
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