Skip to content

Commit

Permalink
Update for code reviewing
Browse files Browse the repository at this point in the history
  • Loading branch information
riverlijunjie committed Jan 10, 2024
1 parent b96ec28 commit 5512a76
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions src/core/src/preprocess/preprocess_impls.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ class InputModelInfo::InputModelInfoImpl : public ModelInfoImpl {};
class OutputModelInfo::OutputModelInfoImpl : public ModelInfoImpl {
public:
void set_color_format(const ColorFormat& color_format, const std::vector<std::string>& sub_names = {}) {
OPENVINO_ASSERT(color_format == ColorFormat::RGB || color_format == ColorFormat::BGR);
m_color_format_set = (color_format == ColorFormat::RGB) || (color_format == ColorFormat::BGR);
OPENVINO_ASSERT(m_color_format_set);
m_color_format = color_format;
m_planes_sub_names = sub_names;
m_color_format_set = true;
}
bool is_color_format_set() const {
return m_color_format_set;
Expand All @@ -54,7 +54,7 @@ class OutputModelInfo::OutputModelInfoImpl : public ModelInfoImpl {

private:
ColorFormat m_color_format = ColorFormat::UNDEFINED;
std::vector<std::string> m_planes_sub_names;
std::vector<std::string> m_planes_sub_names{};
bool m_color_format_set = false;
};

Expand Down
2 changes: 1 addition & 1 deletion src/core/src/preprocess/preprocess_steps_impl.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -724,7 +724,7 @@ std::tuple<Output<Node>, bool> PostStepsList::reverse_channels(const Output<Node
"Layout ",
context.layout().to_string(),
" doesn't have `channels` dimension");
auto shape = node.get_partial_shape();
const auto& shape = node.get_partial_shape();
if (shape.rank().is_static()) {
// This block of code is to preserve output shape if it contains dynamic dimensions
// Otherwise, dynamic version will transform shape {?,3,?,?} to {?,?,?,?} which is still ok but not desired
Expand Down

0 comments on commit 5512a76

Please sign in to comment.