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
gaoqiong
MIGraphX
Commits
692f4c58
"...resnet50_tensorflow.git" did not exist on "983837ff860367690d0d50ab222bc5023f18550e"
Commit
692f4c58
authored
Jul 25, 2018
by
Aditya Atluri
Browse files
fixed code to make cmake analyze pass
parent
0df035a0
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
23 deletions
+11
-23
src/targets/cpu/cpu_lowering.cpp
src/targets/cpu/cpu_lowering.cpp
+11
-23
No files found.
src/targets/cpu/cpu_lowering.cpp
View file @
692f4c58
...
@@ -48,35 +48,23 @@ struct cpu_batch_norm_inference
...
@@ -48,35 +48,23 @@ struct cpu_batch_norm_inference
auto
input
=
args
[
0
];
auto
input
=
args
[
0
];
auto
mini_batch_mean
=
args
[
1
];
auto
mini_batch_mean
=
args
[
1
];
auto
mini_batch_variance
=
args
[
2
];
auto
mini_batch_variance
=
args
[
2
];
auto
gamma
=
args
[
3
];
auto
arg_
gamma
=
args
[
3
];
auto
bias
=
args
[
4
];
auto
arg_
bias
=
args
[
4
];
auto
num_batch
=
output_shape
.
lens
()[
0
];
auto
num_batch
=
output_shape
.
lens
()[
0
];
auto
num_channels
=
output_shape
.
lens
()[
1
];
auto
num_channels
=
output_shape
.
lens
()[
1
];
auto
image_height
=
output_shape
.
lens
()[
2
];
auto
image_height
=
output_shape
.
lens
()[
2
];
auto
image_width
=
output_shape
.
lens
()[
3
];
auto
image_width
=
output_shape
.
lens
()[
3
];
visit_all
(
output
,
input
,
mini_batch_mean
,
mini_batch_variance
,
gamma
,
bias
)(
visit_all
(
output
,
input
,
mini_batch_mean
,
mini_batch_variance
,
arg_gamma
,
arg_bias
)(
[
&
](
auto
result
,
auto
buffer
,
auto
_mean
,
auto
_variance
,
auto
_gamma
,
auto
_bias
)
{
[
&
](
auto
result
,
auto
buffer
,
auto
mean
,
auto
variance
,
auto
gamma
,
auto
bias
)
{
for
(
size_t
n
=
0
;
n
<
num_batch
;
n
++
)
{
dfor
(
num_batch
,
num_channels
,
image_height
,
image_width
)(
size_t
stride_n
=
n
*
num_channels
*
image_height
*
image_width
;
[
&
](
std
::
size_t
n
,
std
::
size_t
c
,
std
::
size_t
h
,
std
::
size_t
w
)
{
for
(
size_t
c
=
0
;
c
<
num_channels
;
c
++
)
result
(
n
,
c
,
h
,
w
)
=
gamma
(
c
)
*
(
buffer
(
n
,
c
,
h
,
w
)
-
mean
(
c
))
/
{
std
::
sqrt
(
variance
(
c
)
+
epsilon
)
+
size_t
stride_c
=
c
*
image_height
*
image_width
;
bias
(
c
);
for
(
size_t
h
=
0
;
h
<
image_height
;
h
++
)
});
{
size_t
stride_h
=
h
*
image_width
;
for
(
size_t
w
=
0
;
w
<
image_width
;
w
++
)
{
size_t
index
=
w
+
stride_h
+
stride_c
+
stride_n
;
result
[
index
]
=
_gamma
[
c
]
*
(
buffer
[
index
]
-
_mean
[
c
])
/
std
::
sqrt
(
_variance
[
c
]
+
epsilon
)
+
_bias
[
c
];
}
}
}
}
});
});
return
output
;
return
output
;
...
...
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