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
ed5f9897
Unverified
Commit
ed5f9897
authored
Nov 08, 2018
by
Paul Fultz II
Committed by
GitHub
Nov 08, 2018
Browse files
Merge pull request #110 from ROCmSoftwarePlatform/dropout
Dropout
parents
6feca68d
ddcaca24
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
0 deletions
+29
-0
src/onnx/onnx.cpp
src/onnx/onnx.cpp
+2
-0
test/onnx/dropout_test.onnx
test/onnx/dropout_test.onnx
+15
-0
test/onnx/onnx_test.cpp
test/onnx/onnx_test.cpp
+12
-0
No files found.
src/onnx/onnx.cpp
View file @
ed5f9897
...
...
@@ -56,6 +56,8 @@ struct onnx_parser
add_generic_op
(
"Relu"
,
op
::
relu
{});
add_generic_op
(
"Sub"
,
op
::
sub
{});
add_generic_op
(
"Sum"
,
op
::
add
{});
// disable dropout for inference
add_generic_op
(
"Dropout"
,
op
::
identity
{});
add_mem_op
(
"ImageScaler"
,
&
onnx_parser
::
parse_imagescaler
);
add_mem_op
(
"LeakyRelu"
,
&
onnx_parser
::
parse_leaky_relu
);
...
...
test/onnx/dropout_test.onnx
0 → 100644
View file @
ed5f9897
dropout-example:Y
01"Dropouttest-dropoutZ
0
b
1
B
\ No newline at end of file
test/onnx/onnx_test.cpp
View file @
ed5f9897
...
...
@@ -158,6 +158,17 @@ void transpose_test()
EXPECT
(
p
==
prog
);
}
void
dropout_test
()
{
migraph
::
program
p
;
auto
input
=
p
.
add_parameter
(
"0"
,
migraph
::
shape
{
migraph
::
shape
::
float_type
,
{
1
,
3
,
2
,
2
}});
p
.
add_instruction
(
migraph
::
op
::
identity
{},
input
);
auto
prog
=
migraph
::
parse_onnx
(
"dropout_test.onnx"
);
EXPECT
(
p
==
prog
);
}
int
main
()
{
pytorch_conv_bias_test
();
...
...
@@ -169,4 +180,5 @@ int main()
globalavgpool_test
();
globalmaxpool_test
();
transpose_test
();
dropout_test
();
}
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