Loading include/input/TfLiteMotionPredictor.h +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ public: // Returns the length of the model's input buffers. size_t inputLength() const; // Returns the length of the model's output buffers. size_t outputLength() const; // Executes the model. // Returns true if the model successfully executed and the output tensors can be read. bool invoke(); Loading libs/input/TfLiteMotionPredictor.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ size_t TfLiteMotionPredictorModel::inputLength() const { return getTensorBuffer<const float>(mInputR).size(); } size_t TfLiteMotionPredictorModel::outputLength() const { return getTensorBuffer<const float>(mOutputR).size(); } std::span<float> TfLiteMotionPredictorModel::inputR() { return getTensorBuffer<float>(mInputR); } Loading libs/input/tests/TfLiteMotionPredictor_test.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -139,8 +139,10 @@ TEST(TfLiteMotionPredictorTest, ModelInputOutputLength) { ASSERT_TRUE(model->invoke()); ASSERT_EQ(model->outputR().size(), model->outputPhi().size()); ASSERT_EQ(model->outputR().size(), model->outputPressure().size()); const int outputLength = model->outputLength(); ASSERT_EQ(outputLength, model->outputR().size()); ASSERT_EQ(outputLength, model->outputPhi().size()); ASSERT_EQ(outputLength, model->outputPressure().size()); } TEST(TfLiteMotionPredictorTest, ModelOutput) { Loading Loading
include/input/TfLiteMotionPredictor.h +3 −0 Original line number Diff line number Diff line Loading @@ -106,6 +106,9 @@ public: // Returns the length of the model's input buffers. size_t inputLength() const; // Returns the length of the model's output buffers. size_t outputLength() const; // Executes the model. // Returns true if the model successfully executed and the output tensors can be read. bool invoke(); Loading
libs/input/TfLiteMotionPredictor.cpp +4 −0 Original line number Diff line number Diff line Loading @@ -346,6 +346,10 @@ size_t TfLiteMotionPredictorModel::inputLength() const { return getTensorBuffer<const float>(mInputR).size(); } size_t TfLiteMotionPredictorModel::outputLength() const { return getTensorBuffer<const float>(mOutputR).size(); } std::span<float> TfLiteMotionPredictorModel::inputR() { return getTensorBuffer<float>(mInputR); } Loading
libs/input/tests/TfLiteMotionPredictor_test.cpp +4 −2 Original line number Diff line number Diff line Loading @@ -139,8 +139,10 @@ TEST(TfLiteMotionPredictorTest, ModelInputOutputLength) { ASSERT_TRUE(model->invoke()); ASSERT_EQ(model->outputR().size(), model->outputPhi().size()); ASSERT_EQ(model->outputR().size(), model->outputPressure().size()); const int outputLength = model->outputLength(); ASSERT_EQ(outputLength, model->outputR().size()); ASSERT_EQ(outputLength, model->outputPhi().size()); ASSERT_EQ(outputLength, model->outputPressure().size()); } TEST(TfLiteMotionPredictorTest, ModelOutput) { Loading