bool fix_shape(loco::AvgPool2D *node)
{
+ LOGGER(l);
+
auto shapedata = node->annot<ShapeInferenceData>();
if (shapedata != nullptr)
{
shape_data->feature_shape(ofm_feature_shape);
node->annot(std::move(shape_data));
- LOGGER(fixshape_avgpool2d);
- INFO(fixshape_avgpool2d) << "Fix AvgPool2D shape = ifm(" << ifm_feature_shape.count().value()
- << "," << ifm_feature_shape.height().value() << ","
- << ifm_feature_shape.width().value() << ","
- << ifm_feature_shape.depth().value() << ") --> ofm("
- << ofm_feature_shape.count().value() << ","
- << ofm_feature_shape.height().value() << ","
- << ofm_feature_shape.width().value() << ","
- << ofm_feature_shape.depth().value() << ")" << std::endl;
+ INFO(l) << "Fix AvgPool2D shape = ifm" << ifm_feature_shape << " --> ofm" << ofm_feature_shape;
+
return true;
}
bool fix_shape(loco::Conv2D *node)
{
- LOGGER(fixshape_conv2d);
+ LOGGER(l);
auto shapedata = node->annot<ShapeInferenceData>();
if (shapedata != nullptr)
shape_data->feature_shape(ofm_feature_shape);
node->annot(std::move(shape_data));
- INFO(fixshape_conv2d) << "Fix Conv2D shape = ifm(" << ifm_feature_shape.count().value() << ","
- << ifm_feature_shape.height().value() << ","
- << ifm_feature_shape.width().value() << ","
- << ifm_feature_shape.depth().value() << "), "
- << "ker(" << ker_filter_shape.height().value() << ","
- << ker_filter_shape.width().value() << ","
- << ker_filter_shape.depth().value() << ","
- << ker_filter_shape.count().value() << ") "
- << "--> ofm(" << ofm_feature_shape.count().value() << ","
- << ofm_feature_shape.height().value() << ","
- << ofm_feature_shape.width().value() << ","
- << ofm_feature_shape.depth().value() << ")" << std::endl;
+ INFO(l) << "Fix Conv2D shape = ifm" << ifm_feature_shape << " ker" << ker_filter_shape
+ << " --> ofm" << ofm_feature_shape;
+
return true;
}
bool fix_shape(loco::MaxPool2D *node)
{
+ LOGGER(l);
+
auto shapedata = node->annot<ShapeInferenceData>();
if (shapedata != nullptr)
{
shape_data->feature_shape(ofm_feature_shape);
node->annot(std::move(shape_data));
- LOGGER(fixshape_maxpool2d);
- INFO(fixshape_maxpool2d) << "Fix MaxPool2D shape = ifm(" << ifm_feature_shape.count().value()
- << "," << ifm_feature_shape.height().value() << ","
- << ifm_feature_shape.width().value() << ","
- << ifm_feature_shape.depth().value() << ") --> ofm("
- << ofm_feature_shape.count().value() << ","
- << ofm_feature_shape.height().value() << ","
- << ofm_feature_shape.width().value() << ","
- << ofm_feature_shape.depth().value() << ")" << std::endl;
+ INFO(l) << "Fix MaxPool2D shape = ifm" << ifm_feature_shape << " --> ofm" << ofm_feature_shape;
+
return true;
}
LOGGER(l);
auto shapedata = node->annot<ShapeInferenceData>();
assert(shapedata != nullptr);
- INFO(l) << "Fix ConstGen shape = " << shapedata->tensor_shape();
+ INFO(l) << "Fix TFConst shape = " << shapedata->tensor_shape();
}
return true;
auto stride_data = node->annot<StrideData>();
assert(stride_data != nullptr);
- INFO(l) << "FixShape TFConv2D strides = " << stride_data->stride()->vertical() << ", "
+ // TODO add and use 'stride_data->stride()' stream out
+ INFO(l) << "Fix TFConv2D strides = " << stride_data->stride()->vertical() << ", "
<< stride_data->stride()->horizontal();
auto ifm_tensor_shape = ifm_shapedata->tensor_shape(); // in NHWC
shape_data->tensor_shape(ofm_tensor_shape);
node->annot(std::move(shape_data));
- INFO(l) << "Fix TFConv2D shape = ifm(" << ifm_tensor_shape.dim(0).value() << ","
- << ifm_tensor_shape.dim(1).value() << "," << ifm_tensor_shape.dim(2).value() << ","
- << ifm_tensor_shape.dim(3).value() << "), "
- << "ker(" << ker_tensor_shape.dim(0).value() << "," << ker_tensor_shape.dim(1).value()
- << "," << ker_tensor_shape.dim(2).value() << "," << ker_tensor_shape.dim(3).value()
- << ") "
- << "--> ofm(" << ofm_tensor_shape.dim(0).value() << "," << ofm_tensor_shape.dim(1).value()
- << "," << ofm_tensor_shape.dim(2).value() << "," << ofm_tensor_shape.dim(3).value() << ")"
- << std::endl;
+ INFO(l) << "Fix TFConv2D shape = ifm" << ifm_tensor_shape << " ker" << ker_tensor_shape
+ << " --> ofm" << ofm_tensor_shape;
+
return true;
}