Skip to content

Commit

Permalink
Fix feature representation for slope layout when shape has a dimensio…
Browse files Browse the repository at this point in the history
…n = 1

Signed-off-by: Andrew Park <[email protected]>
  • Loading branch information
andrew-k-park committed May 26, 2022
1 parent 664175c commit 1169fbb
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion src/plugins/intel_gpu/src/graph/activation.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,18 @@ activation_inst::typed_primitive_inst(network& network, activation_node const& n
"Relu input/output rank mismatch");

if (is_parameterized()) {
auto get_slope_layout = [&](const layout& l){
auto layout = l;
if (layout.size.size() == 1) { // feature representation when shape has a dimension = 1
auto pshape = layout.size;
pshape.insert(pshape.begin(), 1);
layout.size = pshape;
return layout;
}
return layout;
};
/// Slope input x dimension should be equal to input feature size (one slope per channel).
auto slope_layout = node.slope_input().get_output_layout();
auto slope_layout = get_slope_layout(node.slope_input().get_output_layout());

CLDNN_ERROR_LESS_THAN(node.id(),
"Slope x size",
Expand Down

0 comments on commit 1169fbb

Please sign in to comment.