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
211ee00a
"docs/git@developer.sourcefind.cn:hehl2/torchaudio.git" did not exist on "a466b3c2fe22c866523afea8cffbee242f4489a5"
Commit
211ee00a
authored
Mar 15, 2017
by
Neal Wu
Browse files
Convert tf.GraphKeys.VARIABLES -> tf.GraphKeys.GLOBAL_VARIABLES
parent
5978a4a1
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
5 deletions
+5
-5
slim/nets/inception_resnet_v2_test.py
slim/nets/inception_resnet_v2_test.py
+2
-2
slim/nets/inception_v4_test.py
slim/nets/inception_v4_test.py
+2
-2
video_prediction/prediction_train.py
video_prediction/prediction_train.py
+1
-1
No files found.
slim/nets/inception_resnet_v2_test.py
View file @
211ee00a
...
@@ -65,9 +65,9 @@ class InceptionTest(tf.test.TestCase):
...
@@ -65,9 +65,9 @@ class InceptionTest(tf.test.TestCase):
inception
.
inception_resnet_v2
(
inputs
,
num_classes
)
inception
.
inception_resnet_v2
(
inputs
,
num_classes
)
with
tf
.
variable_scope
(
'on_gpu'
),
tf
.
device
(
'/gpu:0'
):
with
tf
.
variable_scope
(
'on_gpu'
),
tf
.
device
(
'/gpu:0'
):
inception
.
inception_resnet_v2
(
inputs
,
num_classes
)
inception
.
inception_resnet_v2
(
inputs
,
num_classes
)
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
VARIABLES
,
scope
=
'on_cpu'
):
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
GLOBAL_
VARIABLES
,
scope
=
'on_cpu'
):
self
.
assertDeviceEqual
(
v
.
device
,
'/cpu:0'
)
self
.
assertDeviceEqual
(
v
.
device
,
'/cpu:0'
)
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
VARIABLES
,
scope
=
'on_gpu'
):
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
GLOBAL_
VARIABLES
,
scope
=
'on_gpu'
):
self
.
assertDeviceEqual
(
v
.
device
,
'/gpu:0'
)
self
.
assertDeviceEqual
(
v
.
device
,
'/gpu:0'
)
def
testHalfSizeImages
(
self
):
def
testHalfSizeImages
(
self
):
...
...
slim/nets/inception_v4_test.py
View file @
211ee00a
...
@@ -146,9 +146,9 @@ class InceptionTest(tf.test.TestCase):
...
@@ -146,9 +146,9 @@ class InceptionTest(tf.test.TestCase):
inception
.
inception_v4
(
inputs
,
num_classes
)
inception
.
inception_v4
(
inputs
,
num_classes
)
with
tf
.
variable_scope
(
'on_gpu'
),
tf
.
device
(
'/gpu:0'
):
with
tf
.
variable_scope
(
'on_gpu'
),
tf
.
device
(
'/gpu:0'
):
inception
.
inception_v4
(
inputs
,
num_classes
)
inception
.
inception_v4
(
inputs
,
num_classes
)
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
VARIABLES
,
scope
=
'on_cpu'
):
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
GLOBAL_
VARIABLES
,
scope
=
'on_cpu'
):
self
.
assertDeviceEqual
(
v
.
device
,
'/cpu:0'
)
self
.
assertDeviceEqual
(
v
.
device
,
'/cpu:0'
)
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
VARIABLES
,
scope
=
'on_gpu'
):
for
v
in
tf
.
get_collection
(
tf
.
GraphKeys
.
GLOBAL_
VARIABLES
,
scope
=
'on_gpu'
):
self
.
assertDeviceEqual
(
v
.
device
,
'/gpu:0'
)
self
.
assertDeviceEqual
(
v
.
device
,
'/gpu:0'
)
def
testHalfSizeImages
(
self
):
def
testHalfSizeImages
(
self
):
...
...
video_prediction/prediction_train.py
View file @
211ee00a
...
@@ -196,7 +196,7 @@ def main(unused_argv):
...
@@ -196,7 +196,7 @@ def main(unused_argv):
print
'Constructing saver.'
print
'Constructing saver.'
# Make saver.
# Make saver.
saver
=
tf
.
train
.
Saver
(
saver
=
tf
.
train
.
Saver
(
tf
.
get_collection
(
tf
.
GraphKeys
.
VARIABLES
),
max_to_keep
=
0
)
tf
.
get_collection
(
tf
.
GraphKeys
.
GLOBAL_
VARIABLES
),
max_to_keep
=
0
)
# Make training session.
# Make training session.
sess
=
tf
.
InteractiveSession
()
sess
=
tf
.
InteractiveSession
()
...
...
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