#include <nncc/core/ADT/feature/HWCLayout.h>
#include <nncc/core/ADT/kernel/NHWCLayout.h>
+#include <nncc/foundation/Memory.h>
+
+using nncc::foundation::make_unique;
+
namespace
{
bool aligned(const coco::FeatureObject *o, const nncc::core::ADT::feature::Layout &l)
auto newbag = _module->entity()->bag()->create(oldbag->size());
auto newobj = _module->entity()->object()->create(oldobj->shape());
+ auto new_layout = make_unique<coco::GenericFeatureLayout>(oldobj->shape());
+
+ new_layout->reorder(nncc::core::ADT::feature::HWCLayout{});
newobj->bag(newbag);
- newobj->reorder<nncc::core::ADT::feature::HWCLayout>();
+ newobj->layout(std::move(new_layout));
return newobj;
}
#include <nncc/core/ADT/feature/Shape.h>
#include <nncc/core/ADT/feature/HWCLayout.h>
+#include <nncc/foundation/Memory.h>
+
#include <cassert>
using namespace nncc::core::ADT;
using nncc::core::ADT::feature::num_elements;
+using nncc::foundation::make_unique;
+
namespace
{
auto pad_shape = shape_xform(avgpool->pad()).forward(ifm_obj->shape());
auto pad_bag = m->entity()->bag()->create(num_elements(pad_shape));
auto pad_obj = m->entity()->object()->create(pad_shape);
+ auto pad_layout = make_unique<coco::GenericFeatureLayout>(pad_shape);
+
+ pad_layout->reorder(feature::HWCLayout{});
pad_obj->bag(pad_bag);
- pad_obj->reorder<feature::HWCLayout>();
+ pad_obj->layout(std::move(pad_layout));
auto pad_op = m->entity()->op()->create<coco::PadF>();