Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
25ab8a28
Commit
25ab8a28
authored
Jan 08, 2019
by
Adam Rogowiec
Committed by
Michał Karzyński
Jan 08, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[NGCPU-339] UT for ArgMin ArgMax with int32 input data type. (#2256)
parent
259c0a48
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
0 deletions
+31
-0
argmax_int32.onnx
test/models/onnx/argmax_int32.onnx
+0
-0
argmin_int32.onnx
test/models/onnx/argmin_int32.onnx
+0
-0
onnx_import.cpp
test/onnx_import.cpp
+31
-0
No files found.
test/models/onnx/argmax_int32.onnx
0 → 100644
View file @
25ab8a28
File added
test/models/onnx/argmin_int32.onnx
0 → 100644
View file @
25ab8a28
File added
test/onnx_import.cpp
View file @
25ab8a28
...
...
@@ -1647,3 +1647,34 @@ TEST(onnx, model_conv_transpose_w_groups)
Outputs
outputs
{
execute
(
function
,
inputs
,
"INTERPRETER"
)};
EXPECT_TRUE
(
test
::
all_close_f
(
expected_output
.
front
(),
outputs
.
front
()));
}
TEST
(
onnx
,
model_argmax_int32
)
{
auto
function
=
onnx_import
::
import_onnx_model
(
file_util
::
path_join
(
SERIALIZED_ZOO
,
"onnx/argmax_int32.onnx"
));
std
::
vector
<
std
::
vector
<
std
::
int32_t
>>
inputs
{
std
::
vector
<
std
::
int32_t
>
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
}};
std
::
vector
<
std
::
vector
<
std
::
int64_t
>>
expected_output
{
std
::
vector
<
std
::
int64_t
>
{
1
,
1
,
1
,
1
,
1
,
1
}};
std
::
vector
<
std
::
vector
<
std
::
int64_t
>>
outputs
{
execute
<
std
::
int32_t
,
std
::
int64_t
>
(
function
,
inputs
,
"CPU"
)};
EXPECT_TRUE
(
test
::
all_close
(
expected_output
.
front
(),
outputs
.
front
()));
}
TEST
(
onnx
,
model_argmin_int32
)
{
auto
function
=
onnx_import
::
import_onnx_model
(
file_util
::
path_join
(
SERIALIZED_ZOO
,
"onnx/argmin_int32.onnx"
));
std
::
vector
<
std
::
vector
<
std
::
int32_t
>>
inputs
{
std
::
vector
<
std
::
int32_t
>
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
,
9
,
10
,
11
,
12
}};
std
::
vector
<
std
::
vector
<
std
::
int64_t
>>
expected_output
{
std
::
vector
<
std
::
int64_t
>
{
0
,
0
,
0
,
0
}};
std
::
vector
<
std
::
vector
<
std
::
int64_t
>>
outputs
{
execute
<
std
::
int32_t
,
std
::
int64_t
>
(
function
,
inputs
,
"CPU"
)};
EXPECT_TRUE
(
test
::
all_close
(
expected_output
.
front
(),
outputs
.
front
()));
}
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