Skip to content

Commit de12c4c

Browse files
committed
Debug
1 parent 52e1ef5 commit de12c4c

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

shared/api/c_api_processor.cc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,10 @@ extError_t ORTX_API_CALL OrtxImagePreProcess(OrtxProcessor* processor, OrtxRawIm
8989
}
9090

9191
auto result_ptr = std::make_unique<TensorResult>();
92+
std::cout << "OrtxImagePreProcess: num_images=" << images_ptr->num_images << std::endl;
9293
status =
9394
processor_ptr->PreProcess(ort_extensions::span(images_ptr->images.get(), images_ptr->num_images), *result_ptr);
95+
std::cout << "OrtxImagePreProcess: Finish PreProcess" << std::endl;
9496
if (status.IsOk()) {
9597
*result = static_cast<OrtxTensorResult*>(result_ptr.release());
9698
} else {

shared/api/image_processor.cc

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,6 +154,7 @@ ImageProcessor::PreProcess(ort_extensions::span<ImageRawData> image_data,
154154
OrtxStatus ImageProcessor::PreProcess(ort_extensions::span<ImageRawData> image_data, TensorResult& r) const {
155155
std::vector<TensorArgs> inputs(image_data.size());
156156
std::vector<TensorPtr> input_tensor_objects(image_data.size());
157+
std::cout << "ImageProcessor::PreProcess image_data size=" << image_data.size() << std::endl;
157158
for (size_t i = 0; i < image_data.size(); ++i) {
158159
auto& ts_input = inputs[i];
159160
ImageRawData& image = image_data[i];
@@ -168,7 +169,7 @@ OrtxStatus ImageProcessor::PreProcess(ort_extensions::span<ImageRawData> image_d
168169
if (!status.IsOk()) {
169170
return status;
170171
}
171-
172+
std::cout << "ImageProcessor::PreProcess Finish Push" << std::endl;
172173
// clear the input tensors
173174
input_tensor_objects.clear();
174175

@@ -182,6 +183,7 @@ OrtxStatus ImageProcessor::PreProcess(ort_extensions::span<ImageRawData> image_d
182183
if (status.IsOk()) {
183184
r.SetTensors(std::move(img_result));
184185
}
186+
std::cout << "ImageProcessor::PreProcess Finish" << std::endl;
185187

186188
return status;
187189
}

0 commit comments

Comments
 (0)