Skip to content

Commit

Permalink
Fix windows warning
Browse files Browse the repository at this point in the history
  • Loading branch information
adityagoel4512 committed Jan 11, 2024
1 parent 8905dbd commit cd5e90e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions onnxruntime/core/providers/cpu/ml/label_encoder.h
Original file line number Diff line number Diff line change
Expand Up @@ -216,8 +216,8 @@ class LabelEncoder_4 final : public OpKernel {
while (input_iter != input.end()) {
const auto found = map_.find(*input_iter);
*output_iter = found == map_.end() ? default_value_ : found->second;
output_iter++;
input_iter++;
++output_iter;
++input_iter;
}
return Status::OK();
}
Expand Down
4 changes: 2 additions & 2 deletions onnxruntime/test/providers/cpu/ml/label_encoder_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,9 @@ TEST(LabelEncoder, TensorBasedAttributesOpset4) {

TEST(LabelEncoder, NaNsMappedTogetherOpset4) {
std::vector<std::int64_t> dims{1, 6};
std::vector<float> input{3.14, std::nanf("1"), 2.718, std::nanf("2"), 5.0, -1};
std::vector<float> input{3.14f, std::nanf("1"), 2.718f, std::nanf("2"), 5.f, -1.f};
std::vector<std::string> output{"a", "ONNX", "b", "ONNX", "c", "onnxruntime"};
std::vector<float> key_data{3.14, 2.718, 5.0, std::nanf("3")};
std::vector<float> key_data{3.14f, 2.718f, 5.0f, std::nanf("3")};
std::vector<std::string> value_data{"a", "b", "c", "ONNX"};

OpTester test("LabelEncoder", 4, onnxruntime::kMLDomain);
Expand Down

0 comments on commit cd5e90e

Please sign in to comment.