The current test uses invalid 'batch' value.
Signed-off-by: Jonghyun Park <jh1302.park@samsung.com>
ElemID BC::at(uint32_t b, uint32_t ch, uint32_t row, uint32_t col) const
{
+ assert(b < _batch);
+
uint32_t offset = 0;
offset += b * _shape.depth();
TEST(FeatureLayoutsTest, BC)
{
- const uint32_t B = 2;
+ // NOTE The current implementation uses a hard-coded "batch" value
+ const uint32_t B = 1;
const uint32_t C = 3;
const uint32_t H = 4;
const uint32_t W = 5;
auto l = coco::FeatureLayouts::BC::create(feature::Shape{C, H, W});
+ ASSERT_EQ(l->batch(), B);
+
// Check whether BC layout is actually channel-wise
for (uint32_t b = 0; b < B; ++b)
{