template <typename T> std::unique_ptr<T> make_layer(void) { return std::unique_ptr<T>{new T}; }
::arm_compute::PadStrideInfo asPadStringInfo(const neurun::model::ExplicitPadding &padding,
- const neurun::util::Stride &stride)
+ const neurun::model::Stride &stride)
{
return ::arm_compute::PadStrideInfo{stride.horizontal,
stride.vertical,
const auto ofm_shape = _ctx.at(ofm_index).shape().asFeature();
const auto ker_shape = _ctx.at(ker_index).shape().asKernel();
- neurun::util::Stride stride;
+ model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
model::OperandIndex bias_index;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
const auto multiplier = _ctx.at(multiplier_index).asScalar<int>();
- neurun::util::Stride stride;
+ neurun::model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
model::OperandIndex bias_index;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
+ neurun::model::Stride stride;
int multiplier;
model::Activation activation;
uint32_t kh;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
uint32_t kh;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
const int32_t kh = _ctx.at(kh_index).asScalar<int32_t>();
const int32_t kw = _ctx.at(kw_index).asScalar<int32_t>();
- neurun::util::Stride stride;
+ neurun::model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
uint32_t kh;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
model::OperandIndex ker_index;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
+ model::Stride stride;
};
Param param;
}
::arm_compute::PadStrideInfo asPadStrideInfo(const model::ExplicitPadding &padding,
- const neurun::util::Stride &stride)
+ const model::Stride &stride)
{
return ::arm_compute::PadStrideInfo{stride.horizontal,
stride.vertical,
bool apply_dim_correction = true);
::arm_compute::PadStrideInfo asPadStrideInfo(const model::ExplicitPadding &padding,
- const neurun::util::Stride &stride);
+ const model::Stride &stride);
::arm_compute::ActivationLayerInfo
asActivationLayerInfo(const ::neurun::model::Activation &act_code);
template <typename T> std::unique_ptr<T> make_layer(void) { return std::unique_ptr<T>{new T}; }
::arm_compute::PadStrideInfo asPadStringInfo(const neurun::model::ExplicitPadding &padding,
- const neurun::util::Stride &stride)
+ const neurun::model::Stride &stride)
{
return ::arm_compute::PadStrideInfo{stride.horizontal,
stride.vertical,
const auto ifm_shape = _ctx.at(ifm_index).shape().asFeature();
const auto ker_shape = _ctx.at(ker_index).shape().asKernel();
- neurun::util::Stride stride;
+ model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
model::OperandIndex bias_index;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
const auto multiplier = _ctx.at(multiplier_index).asScalar<int>();
- neurun::util::Stride stride;
+ model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
model::OperandIndex bias_index;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
+ model::Stride stride;
int multiplier;
model::Activation activation;
uint32_t kh;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
uint32_t kh;
model::ExplicitPadding padding;
- neurun::util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
const auto vstride_index{node.param().vstride_index};
const auto hstride_index{node.param().hstride_index};
- util::Stride stride;
+ model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
::neurun::backend::cpu::kernel::Shape bias_shape;
model::ExplicitPadding padding;
- util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
const auto multiplier_index{node.param().multiplier_index};
- util::Stride stride;
+ model::Stride stride;
stride.vertical = _ctx.at(vstride_index).asScalar<int32_t>();
stride.horizontal = _ctx.at(hstride_index).asScalar<int32_t>();
::neurun::backend::cpu::kernel::Shape bias_shape;
model::ExplicitPadding padding;
- util::Stride stride;
+ model::Stride stride;
int multiplier;
::neurun::backend::cpu::kernel::Shape ifm_shape;
model::ExplicitPadding padding;
- util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
::neurun::backend::cpu::kernel::Shape ifm_shape;
model::ExplicitPadding padding;
- util::Stride stride;
-
+ model::Stride stride;
model::Activation activation;
};
ExplicitPadding param;
};
+struct Stride
+{
+ uint32_t vertical;
+ uint32_t horizontal;
+};
+
} // namespace model
} // namespace neurun
OperandIndex kw_index;
OperandIndex kh_index;
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
struct Param
{
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
struct Param
{
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
Padding padding;
struct Param
{
Padding padding;
-
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
{
OperandIndex kw_index;
OperandIndex kh_index;
-
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
struct Param
{
Padding padding;
+ Stride stride;
+ // hstride_index and vtride_index will be deprecated
OperandIndex hstride_index;
OperandIndex vstride_index;
};
namespace util
{
-struct Stride
-{
- uint32_t vertical;
- uint32_t horizontal;
-};
-
model::ExplicitPadding valid_padding(void);
model::ExplicitPadding same_padding(const nnfw::misc::feature::Shape &ifm_shape,
const nnfw::misc::feature::Shape &ofm_shape,
- const Stride &stride, uint32_t kw, uint32_t kh);
+ const model::Stride &stride, uint32_t kw, uint32_t kh);
model::ExplicitPadding calculatePadding(const model::Padding &padding,
const nnfw::misc::feature::Shape &ifm_shape,
const nnfw::misc::feature::Shape &ofm_shape,
- const Stride &stride, uint32_t kw, uint32_t kh);
+ const model::Stride &stride, uint32_t kw, uint32_t kh);
} // namespace util
} // namespace neurun
model::ExplicitPadding same_padding(const nnfw::misc::feature::Shape &ifm_shape,
const nnfw::misc::feature::Shape &ofm_shape,
- const Stride &stride, uint32_t kw, uint32_t kh)
+ const model::Stride &stride, uint32_t kw, uint32_t kh)
{
model::ExplicitPadding padding;
model::ExplicitPadding calculatePadding(const model::Padding &padding,
const nnfw::misc::feature::Shape &ifm_shape,
const nnfw::misc::feature::Shape &ofm_shape,
- const Stride &stride, uint32_t kw, uint32_t kh)
+ const model::Stride &stride, uint32_t kw, uint32_t kh)
{
if (padding.type == model::PaddingType::EXPLICIT)
{