33 const std::vector<ITensor *> &dst_tensors,
34 const std::vector<ITensor *> &input_back_prop_tensors,
35 const std::vector<ITensor *> &output_back_prop_tensors,
36 const std::vector<ir::PermuteType> &types,
37 bool ignore_forward_in_training,
38 const std::shared_ptr<ExternalContext> &external_context)
39 : builtin::kernel::
PermuteLayer{src_tensors, dst_tensors, types, external_context},
40 _input_back_prop_tensors{input_back_prop_tensors},
41 _output_back_prop_tensors{output_back_prop_tensors},
42 _ignore_forward_in_training{ignore_forward_in_training}
44 assert(input_back_prop_tensors.size() == output_back_prop_tensors.size());
45 assert(src_tensors.size() == dst_tensors.size());
65 for (uint32_t i = 0; i < _output_back_prop_tensors.size(); ++i)
67 auto src_back_prop = _output_back_prop_tensors.at(i);
68 auto dst_back_prop = _input_back_prop_tensors.at(i);
72 if (src_back_prop && dst_back_prop)
74 const auto rank = src_back_prop->getShape().rank();
80 input_offsets, permute_type);