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
16454bdf
Commit
16454bdf
authored
Sep 21, 2017
by
Olivia
Browse files
ne funcione pas
parent
1fae78e7
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
10 deletions
+10
-10
tutorials/image/cifar10/cifar10_train.py
tutorials/image/cifar10/cifar10_train.py
+10
-10
No files found.
tutorials/image/cifar10/cifar10_train.py
View file @
16454bdf
...
...
@@ -36,6 +36,7 @@ from __future__ import absolute_import
from
__future__
import
division
from
__future__
import
print_function
import
argparse
from
datetime
import
datetime
import
time
...
...
@@ -43,17 +44,15 @@ import tensorflow as tf
import
cifar10
FLAGS
=
tf
.
app
.
flags
.
FLAGS
parser
=
argparse
.
ArgumentParser
()
tf
.
app
.
flags
.
DEFINE_string
(
'train_dir'
,
'/tmp/cifar10_train'
,
"""Directory where to write event logs """
"""and checkpoint."""
)
tf
.
app
.
flags
.
DEFINE_integer
(
'max_steps'
,
1000000
,
"""Number of batches to run."""
)
tf
.
app
.
flags
.
DEFINE_boolean
(
'log_device_placement'
,
False
,
"""Whether to log device placement."""
)
tf
.
app
.
flags
.
DEFINE_integer
(
'log_frequency'
,
10
,
"""How often to log results to the console."""
)
parser
.
add_argument
(
'--train_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_train'
,
help
=
'Directory where to write event logs and checkpoint.'
)
parser
.
add_argument
(
'--max_steps'
,
type
=
int
,
default
=
1000000
,
help
=
'Number of batches to run.'
)
parser
.
add_argument
(
'--log_device_placement'
,
type
=
bool
,
default
=
False
,
help
=
'Whether to log device placement.'
)
parser
.
add_argument
(
'--log_frequency'
,
type
=
int
,
default
=
10
,
help
=
'How often to log results to the console.'
)
def
train
():
...
...
@@ -124,4 +123,5 @@ def main(argv=None): # pylint: disable=unused-argument
if
__name__
==
'__main__'
:
FLAGS
=
parser
.
parse_args
()
tf
.
app
.
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