Migrate lite/experimental/writer to lite/tools/serialization

PiperOrigin-RevId: 343776841
Change-Id: I59265afc8c4b2956c1fc603de2694385e1eb6b29
This commit is contained in:
Chao Mei 2020-11-22 19:53:52 -08:00 committed by TensorFlower Gardener
parent 7701fca143
commit cdc17e37e2
8 changed files with 13 additions and 13 deletions

View File

@ -12,8 +12,8 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_WRITER_ENUM_MAPPING_H_
#define TENSORFLOW_LITE_EXPERIMENTAL_WRITER_ENUM_MAPPING_H_
#ifndef TENSORFLOW_LITE_TOOLS_SERIALIZATION_ENUM_MAPPING_H_
#define TENSORFLOW_LITE_TOOLS_SERIALIZATION_ENUM_MAPPING_H_
#include "tensorflow/lite/builtin_op_data.h"
#include "tensorflow/lite/schema/reflection/schema_generated.h"
@ -147,4 +147,4 @@ inline CombinerType CombinerTypeToSchema(TfLiteCombinerType type) {
// int
} // namespace tflite
#endif // TENSORFLOW_LITE_EXPERIMENTAL_WRITER_ENUM_MAPPING_H_
#endif // TENSORFLOW_LITE_TOOLS_SERIALIZATION_ENUM_MAPPING_H_

View File

@ -20,9 +20,9 @@ limitations under the License.
#include <iostream>
#include "tensorflow/lite/experimental/writer/writer_lib.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/model.h"
#include "tensorflow/lite/tools/serialization/writer_lib.h"
int main(int argc, char* argv[]) {
if (argc != 3) {

View File

@ -12,7 +12,7 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/experimental/writer/writer_lib.h"
#include "tensorflow/lite/tools/serialization/writer_lib.h"
#include <cstdlib>
#include <cstring>
@ -23,9 +23,9 @@ limitations under the License.
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/context_util.h"
#include "tensorflow/lite/core/subgraph.h"
#include "tensorflow/lite/experimental/writer/enum_mapping.h"
#include "tensorflow/lite/schema/reflection/schema_generated.h"
#include "tensorflow/lite/schema/schema_utils.h"
#include "tensorflow/lite/tools/serialization/enum_mapping.h"
#include "tensorflow/lite/version.h"
namespace tflite {
@ -34,7 +34,7 @@ std::pair<BuiltinOptions, flatbuffers::Offset<void>> CreateBuiltinUnion(
flatbuffers::FlatBufferBuilder* fbb, enum BuiltinOperator op,
void* builtin_op_data, const TfLiteNode& node) {
switch (op) {
#include "tensorflow/lite/experimental/writer/option_writer_generated.h"
#include "tensorflow/lite/tools/serialization/option_writer_generated.h"
}
return std::make_pair(BuiltinOptions_NONE, flatbuffers::Offset<void>());
}

View File

@ -24,8 +24,8 @@ limitations under the License.
// // Build Interpreter however
// // ... <omitted>
// SubgraphWriter(&interpreter->primary_subgraph()).Write("output.tflite");
#ifndef TENSORFLOW_LITE_EXPERIMENTAL_WRITER_WRITER_LIB_H_
#define TENSORFLOW_LITE_EXPERIMENTAL_WRITER_WRITER_LIB_H_
#ifndef TENSORFLOW_LITE_TOOLS_SERIALIZATION_WRITER_LIB_H_
#define TENSORFLOW_LITE_TOOLS_SERIALIZATION_WRITER_LIB_H_
#include <iostream>
#include <unordered_map>
@ -33,8 +33,8 @@ limitations under the License.
#include "tensorflow/lite/c/common.h"
#include "tensorflow/lite/context_util.h"
#include "tensorflow/lite/core/subgraph.h"
#include "tensorflow/lite/experimental/writer/enum_mapping.h"
#include "tensorflow/lite/schema/reflection/schema_generated.h"
#include "tensorflow/lite/tools/serialization/enum_mapping.h"
#include "tensorflow/lite/version.h"
namespace tflite {
@ -149,4 +149,4 @@ class SubgraphWriter {
} // namespace tflite
#endif // TENSORFLOW_LITE_EXPERIMENTAL_WRITER_WRITER_LIB_H_
#endif // TENSORFLOW_LITE_TOOLS_SERIALIZATION_WRITER_LIB_H_

View File

@ -13,7 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License.
==============================================================================*/
#include "tensorflow/lite/experimental/writer/writer_lib.h"
#include "tensorflow/lite/tools/serialization/writer_lib.h"
#include <numeric>
#include <sstream>

View File

@ -21,9 +21,9 @@ limitations under the License.
#include <iostream>
#include "tensorflow/lite/experimental/writer/writer_lib.h"
#include "tensorflow/lite/kernels/register.h"
#include "tensorflow/lite/model.h"
#include "tensorflow/lite/tools/serialization/writer_lib.h"
int main(int argc, char* argv[]) {
if (argc != 2) {