summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--compiler/plier-tf/include/plier/tf/Convert.h4
-rw-r--r--compiler/plier-tf/src/Convert.cpp4
2 files changed, 4 insertions, 4 deletions
diff --git a/compiler/plier-tf/include/plier/tf/Convert.h b/compiler/plier-tf/include/plier/tf/Convert.h
index 857f32eb2..13e855d20 100644
--- a/compiler/plier-tf/include/plier/tf/Convert.h
+++ b/compiler/plier-tf/include/plier/tf/Convert.h
@@ -60,9 +60,9 @@ enum class DataLayout
};
/// @ brief Convert TF Data Layout string (e.g., "NHWC") to enum class for programming convenience
-const DataLayout as_data_layout(const std::string &tf_layout_str);
+DataLayout as_data_layout(const std::string &tf_layout_str);
-const DataLayout get_data_layout(const tensorflow::NodeDef &node, const std::string &attr_name);
+DataLayout get_data_layout(const tensorflow::NodeDef &node, const std::string &attr_name);
/**
* @brief Copy shape defined in TensorShapeProto to angkor shape
diff --git a/compiler/plier-tf/src/Convert.cpp b/compiler/plier-tf/src/Convert.cpp
index 127c0bc59..15fc2da31 100644
--- a/compiler/plier-tf/src/Convert.cpp
+++ b/compiler/plier-tf/src/Convert.cpp
@@ -141,7 +141,7 @@ loco::DataType as_loco_datatype(const tensorflow::DataType tf_dtype)
throw std::runtime_error{"Unsupported tensorflow dtype: " + tensorflow::DataType_Name(tf_dtype)};
}
-const DataLayout as_data_layout(const std::string &tf_layout_str)
+DataLayout as_data_layout(const std::string &tf_layout_str)
{
if (tf_layout_str == "NHWC")
return DataLayout::NHWC;
@@ -151,7 +151,7 @@ const DataLayout as_data_layout(const std::string &tf_layout_str)
throw std::runtime_error("unknown data layout");
}
-const DataLayout get_data_layout(const tensorflow::NodeDef &node, const std::string &attr_name)
+DataLayout get_data_layout(const tensorflow::NodeDef &node, const std::string &attr_name)
{
auto layout = get_string_attr(node, attr_name);