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
b3247557
Commit
b3247557
authored
Apr 04, 2018
by
Dheera Venkatraman
Browse files
add flag for saving images to summary; strings moved to common.py'
parents
75c931fd
2041d5ca
Changes
103
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
3 deletions
+11
-3
research/object_detection/utils/ops_test.py
research/object_detection/utils/ops_test.py
+7
-0
research/object_detection/utils/variables_helper.py
research/object_detection/utils/variables_helper.py
+1
-1
samples/outreach/demos/eager_execution.ipynb
samples/outreach/demos/eager_execution.ipynb
+3
-2
No files found.
research/object_detection/utils/ops_test.py
View file @
b3247557
...
...
@@ -136,6 +136,13 @@ class OpsTestPadToMultiple(tf.test.TestCase):
padded_tensor_out
=
sess
.
run
(
padded_tensor
)
self
.
assertEqual
((
1
,
2
,
2
,
1
),
padded_tensor_out
.
shape
)
def
test_non_square_padding
(
self
):
tensor
=
tf
.
constant
([[[[
0.
],
[
0.
]]]])
padded_tensor
=
ops
.
pad_to_multiple
(
tensor
,
2
)
with
self
.
test_session
()
as
sess
:
padded_tensor_out
=
sess
.
run
(
padded_tensor
)
self
.
assertEqual
((
1
,
2
,
2
,
1
),
padded_tensor_out
.
shape
)
def
test_padding
(
self
):
tensor
=
tf
.
constant
([[[[
0.
],
[
0.
]],
[[
0.
],
[
0.
]]]])
padded_tensor
=
ops
.
pad_to_multiple
(
tensor
,
4
)
...
...
research/object_detection/utils/variables_helper.py
View file @
b3247557
...
...
@@ -42,7 +42,7 @@ def filter_variables(variables, filter_regex_list, invert=False):
a list of filtered variables.
"""
kept_vars
=
[]
variables_to_ignore_patterns
=
filter
(
None
,
filter_regex_list
)
variables_to_ignore_patterns
=
list
(
filter
(
None
,
filter_regex_list
)
)
for
var
in
variables
:
add
=
True
for
pattern
in
variables_to_ignore_patterns
:
...
...
samples/outreach/demos/eager_execution.ipynb
View file @
b3247557
...
...
@@ -282,9 +282,10 @@
},
"cell_type": "code",
"source": [
"if tf.test.is_gpu_available()
> 0
:\n",
"if tf.test.is_gpu_available():\n",
" with tf.device(tf.test.gpu_device_name()):\n",
" print(tf.matmul(A, A))"
" B = tf.constant([[2.0, 0.0], [0.0, 3.0]])\n",
" print(tf.matmul(B, B))"
],
"execution_count": 0,
"outputs": []
...
...
Prev
1
2
3
4
5
6
Next
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