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
351917d5
Commit
351917d5
authored
Jun 17, 2019
by
nishant.b.patel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Address feedback
parent
d394d986
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
30 additions
and
23 deletions
+30
-23
quantized_convolution.cpp
src/ngraph/op/quantized_convolution.cpp
+30
-23
No files found.
src/ngraph/op/quantized_convolution.cpp
View file @
351917d5
...
...
@@ -77,25 +77,30 @@ void op::QuantizedConvolution::validate_and_infer_types()
NODE_VALIDATION_CHECK
(
this
,
get_input_element_type
(
INPUT_SCALE
).
is_real
()
||
get_input_element_type
(
INPUT_SCALE
).
is_dynamic
()
||
get_input_element_type
(
FILTER_SCALE
).
is_real
()
||
get_input_element_type
(
OUTPUT_SCALE
).
is_real
(),
get_input_element_type
(
FILTER_SCALE
).
is_dynamic
()
||
get_input_element_type
(
OUTPUT_SCALE
).
is_real
()
||
get_input_element_type
(
OUTPUT_SCALE
).
is_dynamic
(),
"Scale must be a floating point number"
);
NODE_VALIDATION_CHECK
(
this
,
get_input_element_type
(
0
)
==
get_input_element_type
(
INPUT_ZERO_POINT
),
"Input Zero point element type ("
,
get_input_element_type
(
INPUT_ZERO_POINT
),
") must match input element type ("
,
get_input_element_type
(
0
),
")"
);
NODE_VALIDATION_CHECK
(
this
,
get_input_element_type
(
1
)
==
get_input_element_type
(
FILTER_ZERO_POINT
),
"Filter Zero point element type ("
,
get_input_element_type
(
FILTER_ZERO_POINT
),
") must match filter element type ("
,
get_input_element_type
(
1
),
")"
);
NODE_VALIDATION_CHECK
(
this
,
get_input_element_type
(
0
).
compatible
(
get_input_element_type
(
INPUT_ZERO_POINT
)),
"Input Zero point element type ("
,
get_input_element_type
(
INPUT_ZERO_POINT
),
") must match input element type ("
,
get_input_element_type
(
0
),
")"
);
NODE_VALIDATION_CHECK
(
this
,
get_input_element_type
(
1
).
compatible
(
get_input_element_type
(
FILTER_ZERO_POINT
)),
"Filter Zero point element type ("
,
get_input_element_type
(
FILTER_ZERO_POINT
),
") must match filter element type ("
,
get_input_element_type
(
1
),
")"
);
// TODO Remove these checks once we support channelwise and vector of scales
NODE_VALIDATION_CHECK
(
this
,
...
...
@@ -158,13 +163,15 @@ void op::QuantizedConvolution::validate_and_infer_types()
0
,
/* batch_axis_result, */
1
/* output_channel_axis_result, */
));
NODE_VALIDATION_CHECK
(
this
,
get_output_element_type
(
0
)
==
get_input_element_type
(
OUTPUT_ZERO_POINT
),
"Output Zero point element type ("
,
get_input_element_type
(
OUTPUT_ZERO_POINT
),
") must match output element type ("
,
get_output_element_type
(
0
),
")"
);
NODE_VALIDATION_CHECK
(
this
,
get_output_element_type
(
0
).
compatible
(
get_input_element_type
(
OUTPUT_ZERO_POINT
)),
"Output Zero point element type ("
,
get_input_element_type
(
OUTPUT_ZERO_POINT
),
") must match output element type ("
,
get_output_element_type
(
0
),
")"
);
}
shared_ptr
<
Node
>
op
::
QuantizedConvolution
::
copy_with_new_args
(
const
NodeVector
&
new_args
)
const
...
...
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