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
edcd29f2
Commit
edcd29f2
authored
Oct 25, 2017
by
Neal Wu
Committed by
GitHub
Oct 25, 2017
Browse files
Replace the two remaining instances of parser.parse_args() for better compatibility (#2590)
parent
487d18e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
4 deletions
+6
-4
official/resnet/cifar10_download_and_extract.py
official/resnet/cifar10_download_and_extract.py
+2
-2
official/wide_deep/data_download.py
official/wide_deep/data_download.py
+4
-2
No files found.
official/resnet/cifar10_download_and_extract.py
View file @
edcd29f2
...
@@ -59,5 +59,5 @@ def main(unused_argv):
...
@@ -59,5 +59,5 @@ def main(unused_argv):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
FLAGS
=
parser
.
parse_args
()
FLAGS
,
unparsed
=
parser
.
parse_
known_
args
()
tf
.
app
.
run
()
tf
.
app
.
run
(
argv
=
[
sys
.
argv
[
0
]]
+
unparsed
)
official/wide_deep/data_download.py
View file @
edcd29f2
...
@@ -20,6 +20,7 @@ from __future__ import print_function
...
@@ -20,6 +20,7 @@ from __future__ import print_function
import
argparse
import
argparse
import
os
import
os
import
sys
from
six.moves
import
urllib
from
six.moves
import
urllib
import
tensorflow
as
tf
import
tensorflow
as
tf
...
@@ -31,6 +32,7 @@ EVAL_FILE = 'adult.test'
...
@@ -31,6 +32,7 @@ EVAL_FILE = 'adult.test'
EVAL_URL
=
'%s/%s'
%
(
DATA_URL
,
EVAL_FILE
)
EVAL_URL
=
'%s/%s'
%
(
DATA_URL
,
EVAL_FILE
)
parser
=
argparse
.
ArgumentParser
()
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
parser
.
add_argument
(
'--data_dir'
,
type
=
str
,
default
=
'/tmp/census_data'
,
'--data_dir'
,
type
=
str
,
default
=
'/tmp/census_data'
,
help
=
'Directory to download census data'
)
help
=
'Directory to download census data'
)
...
@@ -65,5 +67,5 @@ def main(unused_argv):
...
@@ -65,5 +67,5 @@ def main(unused_argv):
if
__name__
==
'__main__'
:
if
__name__
==
'__main__'
:
FLAGS
=
parser
.
parse_args
()
FLAGS
,
unparsed
=
parser
.
parse_
known_
args
()
tf
.
app
.
run
()
tf
.
app
.
run
(
argv
=
[
sys
.
argv
[
0
]]
+
unparsed
)
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