fixed 'is_rotating_except_batch' to follow the IE order (#12050)
This commit is contained in:
@@ -26,13 +26,13 @@ public:
|
||||
std::vector<uint16_t> get_permute_order() const { return get_primitive()->permute_order; }
|
||||
bool is_rotating_except_batch() const {
|
||||
// Target transform: Rotate feature dim to back to be taken as inner-most axis
|
||||
// ex) 0(b), 4(f), 1(z), 2(y), 3(x)
|
||||
// ex) 0(b), 3(f), 1(y), 2(x)
|
||||
// ex) 0(b), 2(f), 3(x), 4(y), 1(z)
|
||||
// ex) 0(b), 2(f), 3(x), 1(y)
|
||||
auto& order = get_primitive()->permute_order;
|
||||
if ((int32_t) order[1] != order.size() - 1) return false;
|
||||
if ((int32_t) order[order.size() - 2] != order.size() - 1) return false;
|
||||
if ((int32_t) order[0] != 0) return false;
|
||||
for (int32_t i = 2; i < (int32_t) order.size(); ++i) {
|
||||
if ((int32_t)order[i] != (i - 1)) return false;
|
||||
if ((int32_t)order[i - 1] != i) return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user