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
e19cc4a7
Commit
e19cc4a7
authored
Aug 23, 2018
by
Michał Karzyński
Committed by
Robert Kimball
Aug 23, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[ONNX] Refactor exceptions (#1467)
parent
31ee5658
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
17 deletions
+16
-17
exceptions.hpp
src/ngraph/frontend/onnx_import/exceptions.hpp
+10
-11
batch_norm.hpp
src/ngraph/frontend/onnx_import/op/batch_norm.hpp
+6
-6
No files found.
src/ngraph/frontend/onnx_import/exceptions.hpp
View file @
e19cc4a7
...
...
@@ -24,29 +24,28 @@ namespace ngraph
{
namespace
error
{
struct
not_supported_error
:
ngraph_error
struct
NotSupported
:
ngraph_error
{
explicit
not_supported_error
(
const
std
::
string
&
op_name
,
const
std
::
string
&
name
,
const
std
::
string
&
message
)
explicit
NotSupported
(
const
std
::
string
&
op_name
,
const
std
::
string
&
name
,
const
std
::
string
&
message
)
:
ngraph_error
{
op_name
+
" node ("
+
name
+
"): "
+
message
}
{
}
};
namespace
op
namespace
parameter
{
struct
op_value_error
:
ngraph_error
struct
Value
:
ngraph_error
{
explicit
op_value_error
(
const
std
::
string
&
op_name
,
const
std
::
string
&
name
,
const
std
::
string
&
message
)
Value
(
const
std
::
string
&
op_name
,
const
std
::
string
&
name
,
const
std
::
string
&
message
)
:
ngraph_error
{
op_name
+
" node ("
+
name
+
"): "
+
message
}
{
}
};
}
// namespace op
}
// namespace paramter
}
// namespace error
...
...
src/ngraph/frontend/onnx_import/op/batch_norm.hpp
View file @
e19cc4a7
...
...
@@ -48,15 +48,15 @@ namespace ngraph
if
(
!
is_test
)
{
throw
error
::
not_supported_error
(
"BatchNormalization"
,
node
.
get_name
(),
"only 'is_test' mode is currently supported."
);
throw
error
::
NotSupported
(
"BatchNormalization"
,
node
.
get_name
(),
"only 'is_test' mode is currently supported."
);
}
if
(
!
spatial
)
{
throw
error
::
not_supported_error
(
"BatchNormalization"
,
node
.
get_name
(),
"only 'spatial' mode is currently supported."
);
throw
error
::
NotSupported
(
"BatchNormalization"
,
node
.
get_name
(),
"only 'spatial' mode is currently supported."
);
}
if
(
inputs
.
size
()
>=
5
)
...
...
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