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
70e55a10
"vscode:/vscode.git/clone" did not exist on "fc9964c8f50b19814ee36913ad6bcf24323e89d8"
Commit
70e55a10
authored
Sep 21, 2017
by
Olivia
Browse files
spacing
parent
00e6186d
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
36 additions
and
17 deletions
+36
-17
tutorials/image/cifar10/cifar10.py
tutorials/image/cifar10/cifar10.py
+8
-3
tutorials/image/cifar10/cifar10_eval.py
tutorials/image/cifar10/cifar10_eval.py
+12
-6
tutorials/image/cifar10/cifar10_multi_gpu_train.py
tutorials/image/cifar10/cifar10_multi_gpu_train.py
+8
-4
tutorials/image/cifar10/cifar10_train.py
tutorials/image/cifar10/cifar10_train.py
+8
-4
No files found.
tutorials/image/cifar10/cifar10.py
View file @
70e55a10
...
...
@@ -49,9 +49,14 @@ import cifar10_input
parser
=
argparse
.
ArgumentParser
()
# Basic model parameters.
parser
.
add_argument
(
'--batch_size'
,
type
=
int
,
default
=
128
,
help
=
'Number of images to process in a batch.'
)
parser
.
add_argument
(
'--data_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_data'
,
help
=
'Path to the CIFAR-10 data directory.'
)
parser
.
add_argument
(
'--use_fp16'
,
type
=
bool
,
default
=
False
,
help
=
'Train the model using fp16.'
)
parser
.
add_argument
(
'--batch_size'
,
type
=
int
,
default
=
128
,
help
=
'Number of images to process in a batch.'
)
parser
.
add_argument
(
'--data_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_data'
,
help
=
'Path to the CIFAR-10 data directory.'
)
parser
.
add_argument
(
'--use_fp16'
,
type
=
bool
,
default
=
False
,
help
=
'Train the model using fp16.'
)
FLAGS
=
parser
.
parse_args
()
# Global constants describing the CIFAR-10 data set.
...
...
tutorials/image/cifar10/cifar10_eval.py
View file @
70e55a10
...
...
@@ -46,17 +46,23 @@ import cifar10
parser
=
cifar10
.
parser
parser
.
add_argument
(
'--eval_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_eval'
,
help
=
'Directory where to write event logs.'
)
parser
.
add_argument
(
'--eval_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_eval'
,
help
=
'Directory where to write event logs.'
)
parser
.
add_argument
(
'--eval_data'
,
type
=
str
,
default
=
'test'
,
help
=
'Either `test` or `train_eval`.'
)
parser
.
add_argument
(
'--eval_data'
,
type
=
str
,
default
=
'test'
,
help
=
'Either `test` or `train_eval`.'
)
parser
.
add_argument
(
'--checkpoint_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_train'
,
help
=
'Directory where to read model checkpoints.'
)
parser
.
add_argument
(
'--checkpoint_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_train'
,
help
=
'Directory where to read model checkpoints.'
)
parser
.
add_argument
(
'--eval_interval_secs'
,
type
=
int
,
default
=
60
*
5
,
help
=
'How often to run the eval.'
)
parser
.
add_argument
(
'--eval_interval_secs'
,
type
=
int
,
default
=
60
*
5
,
help
=
'How often to run the eval.'
)
parser
.
add_argument
(
'--num_examples'
,
type
=
int
,
default
=
10000
,
help
=
'Number of examples to run.'
)
parser
.
add_argument
(
'--num_examples'
,
type
=
int
,
default
=
10000
,
help
=
'Number of examples to run.'
)
parser
.
add_argument
(
'--run_once'
,
type
=
bool
,
default
=
False
,
help
=
'Whether to run eval only once.'
)
parser
.
add_argument
(
'--run_once'
,
type
=
bool
,
default
=
False
,
help
=
'Whether to run eval only once.'
)
def
eval_once
(
saver
,
summary_writer
,
top_k_op
,
summary_op
):
...
...
tutorials/image/cifar10/cifar10_multi_gpu_train.py
View file @
70e55a10
...
...
@@ -52,13 +52,17 @@ import cifar10
parser
=
cifar10
.
parser
parser
.
add_argument
(
'--train_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_train'
,
help
=
'Directory where to write event logs and checkpoint.'
)
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
(
'--max_steps'
,
type
=
int
,
default
=
1000000
,
help
=
'Number of batches to run.'
)
parser
.
add_argument
(
'--num_gpus'
,
type
=
int
,
default
=
1
,
help
=
'How many GPUs to use.'
)
parser
.
add_argument
(
'--num_gpus'
,
type
=
int
,
default
=
1
,
help
=
'How many GPUs to use.'
)
parser
.
add_argument
(
'--log_device_placement'
,
type
=
bool
,
default
=
False
,
help
=
'Whether to log device placement.'
)
parser
.
add_argument
(
'--log_device_placement'
,
type
=
bool
,
default
=
False
,
help
=
'Whether to log device placement.'
)
def
tower_loss
(
scope
,
images
,
labels
):
...
...
tutorials/image/cifar10/cifar10_train.py
View file @
70e55a10
...
...
@@ -46,13 +46,17 @@ import cifar10
parser
=
cifar10
.
parser
parser
.
add_argument
(
'--train_dir'
,
type
=
str
,
default
=
'/tmp/cifar10_train'
,
help
=
'Directory where to write event logs and checkpoint.'
)
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
(
'--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_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.'
)
parser
.
add_argument
(
'--log_frequency'
,
type
=
int
,
default
=
10
,
help
=
'How often to log results to the console.'
)
def
train
():
...
...
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