Skip to content

Commit 4cfbd29

Browse files
wangtztflite-support-robot
authored andcommitted
#TaskLib #audio: Fix OSS build for audio embedder.
PiperOrigin-RevId: 399198967
1 parent 4844bdc commit 4cfbd29

File tree

5 files changed

+12
-10
lines changed

5 files changed

+12
-10
lines changed

tensorflow_lite_support/cc/task/processor/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,7 @@ cc_library_with_tflite(
5050
],
5151
deps = [
5252
"//tensorflow_lite_support/cc/port:status_macros",
53+
"//tensorflow_lite_support/cc/port:statusor",
5354
"//tensorflow_lite_support/cc/task/core:classification_head",
5455
"//tensorflow_lite_support/cc/task/core:label_map_item",
5556
"//tensorflow_lite_support/cc/task/core:score_calibration",

tensorflow_lite_support/cc/task/processor/classification_postprocessor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ using ::tflite::task::core::ScoreCalibration;
4040
} // namespace
4141

4242
/* static */
43-
absl::StatusOr<std::unique_ptr<ClassificationPostprocessor>>
43+
tflite::support::StatusOr<std::unique_ptr<ClassificationPostprocessor>>
4444
ClassificationPostprocessor::Create(
4545
core::TfLiteEngine* engine, const std::initializer_list<int> output_indices,
4646
std::unique_ptr<ClassificationOptions> options) {

tensorflow_lite_support/cc/task/processor/classification_postprocessor.h

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ limitations under the License.
1919
#include <initializer_list>
2020

2121
#include "tensorflow_lite_support/cc/port/status_macros.h"
22+
#include "tensorflow_lite_support/cc/port/statusor.h"
2223
#include "tensorflow_lite_support/cc/task/core/classification_head.h"
2324
#include "tensorflow_lite_support/cc/task/core/label_map_item.h"
2425
#include "tensorflow_lite_support/cc/task/core/score_calibration.h"
@@ -46,10 +47,10 @@ namespace processor {
4647
// results will be filled.
4748
class ClassificationPostprocessor : public Postprocessor {
4849
public:
49-
static absl::StatusOr<std::unique_ptr<ClassificationPostprocessor>> Create(
50-
core::TfLiteEngine* engine,
51-
const std::initializer_list<int> output_indices,
52-
std::unique_ptr<ClassificationOptions> options);
50+
static tflite::support::StatusOr<std::unique_ptr<ClassificationPostprocessor>>
51+
Create(core::TfLiteEngine* engine,
52+
const std::initializer_list<int> output_indices,
53+
std::unique_ptr<ClassificationOptions> options);
5354

5455
template <typename T>
5556
absl::Status Postprocess(T* classifications);

tensorflow_lite_support/cc/task/processor/embedding_postprocessor.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ namespace task {
2020
namespace processor {
2121

2222
/* static */
23-
absl::StatusOr<std::unique_ptr<EmbeddingPostprocessor>>
23+
tflite::support::StatusOr<std::unique_ptr<EmbeddingPostprocessor>>
2424
EmbeddingPostprocessor::Create(core::TfLiteEngine* engine,
2525
const std::initializer_list<int> output_indices,
2626
std::unique_ptr<EmbeddingOptions> options) {

tensorflow_lite_support/cc/task/processor/embedding_postprocessor.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@ namespace processor {
3535
// - Either 2 or 4 dimensions, i.e. `[1 x N]` or `[1 x 1 x 1 x N]`.
3636
class EmbeddingPostprocessor : public Postprocessor {
3737
public:
38-
static absl::StatusOr<std::unique_ptr<EmbeddingPostprocessor>> Create(
39-
core::TfLiteEngine* engine,
40-
const std::initializer_list<int> output_indices,
41-
std::unique_ptr<EmbeddingOptions> options);
38+
static tflite::support::StatusOr<std::unique_ptr<EmbeddingPostprocessor>>
39+
Create(core::TfLiteEngine* engine,
40+
const std::initializer_list<int> output_indices,
41+
std::unique_ptr<EmbeddingOptions> options);
4242

4343
template <typename T>
4444
absl::Status Postprocess(T* embedding);

0 commit comments

Comments
 (0)