ofm_obj->layout(coco::FeatureLayouts::BCHW::create(ofm_obj->shape()));
// Create an object for kernel
+ using namespace coco::KernelLayouts;
+
const auto ker_shape = spec.ker_shape();
auto ker_bag = m->entity()->bag()->create(num_elements(ker_shape));
- auto ker_obj = m->entity()->object()->create(morph::caffe::as_kernel_shape(ker_shape));
- auto ker_layout = make_unique<coco::GenericKernelLayout>(ker_obj->shape());
-
- ker_layout->reorder<kernel::NCHWLayout>();
+ auto ker_obj = m->entity()->object()->create<coco::KernelObject>();
ker_obj->bag(ker_bag);
- ker_obj->layout(std::move(ker_layout));
+ ker_obj->layout(NCHW::create((morph::caffe::as_kernel_shape(ker_shape))));
// Create a kernel overlay for the kernel object
d->f32()->allocate(ker_obj);