diff options
author | Chunseok Lee <chunseok.lee@samsung.com> | 2020-03-05 15:10:09 +0900 |
---|---|---|
committer | Chunseok Lee <chunseok.lee@samsung.com> | 2020-03-05 15:22:53 +0900 |
commit | d91a039e0eda6fd70dcd22672b8ce1817c1ca50e (patch) | |
tree | 62668ec548cf31fadbbf4e99522999ad13434a25 /libs/misc/src/tensor/Comparator.cpp | |
parent | bd11b24234d7d43dfe05a81c520aa01ffad06e42 (diff) | |
download | nnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.tar.gz nnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.tar.bz2 nnfw-d91a039e0eda6fd70dcd22672b8ce1817c1ca50e.zip |
catch up to tizen_5.5 and remove unness dir
- update to tizen_5.5
- remove dirs
Diffstat (limited to 'libs/misc/src/tensor/Comparator.cpp')
-rw-r--r-- | libs/misc/src/tensor/Comparator.cpp | 40 |
1 files changed, 0 insertions, 40 deletions
diff --git a/libs/misc/src/tensor/Comparator.cpp b/libs/misc/src/tensor/Comparator.cpp deleted file mode 100644 index 013c9eed2..000000000 --- a/libs/misc/src/tensor/Comparator.cpp +++ /dev/null @@ -1,40 +0,0 @@ -#include "misc/tensor/Comparator.h" -#include "misc/tensor/Zipper.h" - -#include "misc/fp32.h" - -namespace nnfw -{ -namespace misc -{ -namespace tensor -{ - -std::vector<Diff<float>> Comparator::compare(const Shape &shape, const Reader<float> &expected, - const Reader<float> &obtained, - Observer *observer) const -{ - std::vector<Diff<float>> res; - - zip(shape, expected, obtained) << - [&](const Index &index, float expected_value, float obtained_value) { - const auto relative_diff = nnfw::misc::fp32::relative_diff(expected_value, obtained_value); - - if (!_compare_fn(expected_value, obtained_value)) - { - res.emplace_back(index, expected_value, obtained_value); - } - - // Update max_diff_index, if necessary - if (observer != nullptr) - { - observer->notify(index, expected_value, obtained_value); - } - }; - - return res; -} - -} // namespace tensor -} // namespace misc -} // namespace nnfw |