Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion Tools/ML/model.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -161,33 +161,33 @@
graph->set_name("LinearGraph");
add_concat_to_input(model, specs);

std::cout << "=== ONNX Model Summary ===\n";

Check failure on line 164 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::cout << "Producer: " << model.producer_name() << "\n";

Check failure on line 165 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::cout << "IR version: " << model.ir_version() << "\n";

Check failure on line 166 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
std::cout << "Graph name: " << model.graph().name() << "\n";

Check failure on line 167 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).

// Inputs
{
onnx::GraphProto const& graph = model.graph();
std::cout << "\nInputs:\n";

Check failure on line 172 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (const auto& input : graph.input()) {
std::cout << " " << input.name() << " : ";

Check failure on line 174 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (input.has_type() && input.type().has_tensor_type()) {
const auto& shape = input.type().tensor_type().shape();
print_shape(shape);
}
std::cout << "\n";

Check failure on line 179 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

// Outputs
std::cout << "\nOutputs:\n";

Check failure on line 183 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
for (const auto& output : graph.output()) {
std::cout << " " << output.name() << " : ";

Check failure on line 185 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
if (output.has_type() && output.type().has_tensor_type()) {
const auto& shape = output.type().tensor_type().shape();
print_shape(shape);
}
std::cout << "\n";

Check failure on line 190 in Tools/ML/model.cxx

View workflow job for this annotation

GitHub Actions / O2 linter

[logging]

Use O2 logging (LOG, LOGF, LOGP).
}

// Nodes
Expand Down Expand Up @@ -222,7 +222,8 @@
}
}

void OnnxModel::add_concat_to_input(onnx::ModelProto& model, std::unordered_map<std::string, float> originals) {
void OnnxModel::add_concat_to_input(onnx::ModelProto& model, std::unordered_map<std::string, float> originals)
{
auto* graph = model.mutable_graph();

// 1. Save original input name and remove it
Expand Down
2 changes: 1 addition & 1 deletion Tools/ML/model.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@

#include <Framework/Logger.h>

#include <onnxruntime_cxx_api.h>
#include <onnx/onnx_pb.h>
#include <onnxruntime_cxx_api.h>

#include <algorithm>
#include <cassert>
Expand Down
Loading