diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2018-09-16 20:44:35 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2018-09-16 20:49:04 -0700 |
commit | b6a8ade2ce2b42ed4bed67aee40da4c1705e01fe (patch) | |
tree | 9cdaa58167348e6c0c6b84d4876c6d03e18a8dc6 /tensorflow/contrib/lite/schema | |
parent | 791f48d3aaaa875c23de1484f7ef1d0656fbabca (diff) |
Add ZerosLike to schema.
PiperOrigin-RevId: 213212445
Diffstat (limited to 'tensorflow/contrib/lite/schema')
-rw-r--r-- | tensorflow/contrib/lite/schema/schema.fbs | 5 | ||||
-rwxr-xr-x | tensorflow/contrib/lite/schema/schema_generated.h | 124 |
2 files changed, 123 insertions, 6 deletions
diff --git a/tensorflow/contrib/lite/schema/schema.fbs b/tensorflow/contrib/lite/schema/schema.fbs index f0db22d581..4c339317cb 100644 --- a/tensorflow/contrib/lite/schema/schema.fbs +++ b/tensorflow/contrib/lite/schema/schema.fbs @@ -174,6 +174,7 @@ enum BuiltinOperator : byte { FLOOR_DIV = 90, REDUCE_ANY = 91, SQUARE = 92, + ZEROS_LIKE = 93, } // Options for the builtin operators. @@ -244,6 +245,7 @@ union BuiltinOptions { UnpackOptions, FloorDivOptions, SquareOptions, + ZerosLikeOptions, } enum Padding : byte { SAME, VALID } @@ -588,6 +590,9 @@ table FloorDivOptions { table SquareOptions { } +table ZerosLikeOptions { +} + // An OperatorCode can be an enum value (BuiltinOperator) if the operator is a // builtin, or a string if the operator is custom. table OperatorCode { diff --git a/tensorflow/contrib/lite/schema/schema_generated.h b/tensorflow/contrib/lite/schema/schema_generated.h index 8c086a5e67..03c227f987 100755 --- a/tensorflow/contrib/lite/schema/schema_generated.h +++ b/tensorflow/contrib/lite/schema/schema_generated.h @@ -229,6 +229,9 @@ struct FloorDivOptionsT; struct SquareOptions; struct SquareOptionsT; +struct ZerosLikeOptions; +struct ZerosLikeOptionsT; + struct OperatorCode; struct OperatorCodeT; @@ -387,11 +390,12 @@ enum BuiltinOperator { BuiltinOperator_FLOOR_DIV = 90, BuiltinOperator_REDUCE_ANY = 91, BuiltinOperator_SQUARE = 92, + BuiltinOperator_ZEROS_LIKE = 93, BuiltinOperator_MIN = BuiltinOperator_ADD, - BuiltinOperator_MAX = BuiltinOperator_SQUARE + BuiltinOperator_MAX = BuiltinOperator_ZEROS_LIKE }; -inline BuiltinOperator (&EnumValuesBuiltinOperator())[92] { +inline BuiltinOperator (&EnumValuesBuiltinOperator())[93] { static BuiltinOperator values[] = { BuiltinOperator_ADD, BuiltinOperator_AVERAGE_POOL_2D, @@ -484,7 +488,8 @@ inline BuiltinOperator (&EnumValuesBuiltinOperator())[92] { BuiltinOperator_REDUCE_MIN, BuiltinOperator_FLOOR_DIV, BuiltinOperator_REDUCE_ANY, - BuiltinOperator_SQUARE + BuiltinOperator_SQUARE, + BuiltinOperator_ZEROS_LIKE }; return values; } @@ -584,6 +589,7 @@ inline const char **EnumNamesBuiltinOperator() { "FLOOR_DIV", "REDUCE_ANY", "SQUARE", + "ZEROS_LIKE", nullptr }; return names; @@ -662,11 +668,12 @@ enum BuiltinOptions { BuiltinOptions_UnpackOptions = 64, BuiltinOptions_FloorDivOptions = 65, BuiltinOptions_SquareOptions = 66, + BuiltinOptions_ZerosLikeOptions = 67, BuiltinOptions_MIN = BuiltinOptions_NONE, - BuiltinOptions_MAX = BuiltinOptions_SquareOptions + BuiltinOptions_MAX = BuiltinOptions_ZerosLikeOptions }; -inline BuiltinOptions (&EnumValuesBuiltinOptions())[67] { +inline BuiltinOptions (&EnumValuesBuiltinOptions())[68] { static BuiltinOptions values[] = { BuiltinOptions_NONE, BuiltinOptions_Conv2DOptions, @@ -734,7 +741,8 @@ inline BuiltinOptions (&EnumValuesBuiltinOptions())[67] { BuiltinOptions_LogicalNotOptions, BuiltinOptions_UnpackOptions, BuiltinOptions_FloorDivOptions, - BuiltinOptions_SquareOptions + BuiltinOptions_SquareOptions, + BuiltinOptions_ZerosLikeOptions }; return values; } @@ -808,6 +816,7 @@ inline const char **EnumNamesBuiltinOptions() { "UnpackOptions", "FloorDivOptions", "SquareOptions", + "ZerosLikeOptions", nullptr }; return names; @@ -1086,6 +1095,10 @@ template<> struct BuiltinOptionsTraits<SquareOptions> { static const BuiltinOptions enum_value = BuiltinOptions_SquareOptions; }; +template<> struct BuiltinOptionsTraits<ZerosLikeOptions> { + static const BuiltinOptions enum_value = BuiltinOptions_ZerosLikeOptions; +}; + struct BuiltinOptionsUnion { BuiltinOptions type; void *value; @@ -1645,6 +1658,14 @@ struct BuiltinOptionsUnion { return type == BuiltinOptions_SquareOptions ? reinterpret_cast<const SquareOptionsT *>(value) : nullptr; } + ZerosLikeOptionsT *AsZerosLikeOptions() { + return type == BuiltinOptions_ZerosLikeOptions ? + reinterpret_cast<ZerosLikeOptionsT *>(value) : nullptr; + } + const ZerosLikeOptionsT *AsZerosLikeOptions() const { + return type == BuiltinOptions_ZerosLikeOptions ? + reinterpret_cast<const ZerosLikeOptionsT *>(value) : nullptr; + } }; bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type); @@ -5888,6 +5909,46 @@ inline flatbuffers::Offset<SquareOptions> CreateSquareOptions( flatbuffers::Offset<SquareOptions> CreateSquareOptions(flatbuffers::FlatBufferBuilder &_fbb, const SquareOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +struct ZerosLikeOptionsT : public flatbuffers::NativeTable { + typedef ZerosLikeOptions TableType; + ZerosLikeOptionsT() { + } +}; + +struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ZerosLikeOptionsT NativeTableType; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); + } + ZerosLikeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; + void UnPackTo(ZerosLikeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver = nullptr) const; + static flatbuffers::Offset<ZerosLikeOptions> Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); +}; + +struct ZerosLikeOptionsBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ZerosLikeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + ZerosLikeOptionsBuilder &operator=(const ZerosLikeOptionsBuilder &); + flatbuffers::Offset<ZerosLikeOptions> Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset<ZerosLikeOptions>(end); + return o; + } +}; + +inline flatbuffers::Offset<ZerosLikeOptions> CreateZerosLikeOptions( + flatbuffers::FlatBufferBuilder &_fbb) { + ZerosLikeOptionsBuilder builder_(_fbb); + return builder_.Finish(); +} + +flatbuffers::Offset<ZerosLikeOptions> CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + struct OperatorCodeT : public flatbuffers::NativeTable { typedef OperatorCode TableType; BuiltinOperator builtin_code; @@ -6219,6 +6280,9 @@ struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { const SquareOptions *builtin_options_as_SquareOptions() const { return builtin_options_type() == BuiltinOptions_SquareOptions ? static_cast<const SquareOptions *>(builtin_options()) : nullptr; } + const ZerosLikeOptions *builtin_options_as_ZerosLikeOptions() const { + return builtin_options_type() == BuiltinOptions_ZerosLikeOptions ? static_cast<const ZerosLikeOptions *>(builtin_options()) : nullptr; + } const flatbuffers::Vector<uint8_t> *custom_options() const { return GetPointer<const flatbuffers::Vector<uint8_t> *>(VT_CUSTOM_OPTIONS); } @@ -6514,6 +6578,10 @@ template<> inline const SquareOptions *Operator::builtin_options_as<SquareOption return builtin_options_as_SquareOptions(); } +template<> inline const ZerosLikeOptions *Operator::builtin_options_as<ZerosLikeOptions>() const { + return builtin_options_as_ZerosLikeOptions(); +} + struct OperatorBuilder { flatbuffers::FlatBufferBuilder &fbb_; flatbuffers::uoffset_t start_; @@ -8782,6 +8850,29 @@ inline flatbuffers::Offset<SquareOptions> CreateSquareOptions(flatbuffers::FlatB _fbb); } +inline ZerosLikeOptionsT *ZerosLikeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = new ZerosLikeOptionsT(); + UnPackTo(_o, _resolver); + return _o; +} + +inline void ZerosLikeOptions::UnPackTo(ZerosLikeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +} + +inline flatbuffers::Offset<ZerosLikeOptions> ZerosLikeOptions::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { + return CreateZerosLikeOptions(_fbb, _o, _rehasher); +} + +inline flatbuffers::Offset<ZerosLikeOptions> CreateZerosLikeOptions(flatbuffers::FlatBufferBuilder &_fbb, const ZerosLikeOptionsT *_o, const flatbuffers::rehasher_function_t *_rehasher) { + (void)_rehasher; + (void)_o; + struct _VectorArgs { flatbuffers::FlatBufferBuilder *__fbb; const ZerosLikeOptionsT* __o; const flatbuffers::rehasher_function_t *__rehasher; } _va = { &_fbb, _o, _rehasher}; (void)_va; + return tflite::CreateZerosLikeOptions( + _fbb); +} + inline OperatorCodeT *OperatorCode::UnPack(const flatbuffers::resolver_function_t *_resolver) const { auto _o = new OperatorCodeT(); UnPackTo(_o, _resolver); @@ -9235,6 +9326,10 @@ inline bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *ob auto ptr = reinterpret_cast<const SquareOptions *>(obj); return verifier.VerifyTable(ptr); } + case BuiltinOptions_ZerosLikeOptions: { + auto ptr = reinterpret_cast<const ZerosLikeOptions *>(obj); + return verifier.VerifyTable(ptr); + } default: return false; } } @@ -9517,6 +9612,10 @@ inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, c auto ptr = reinterpret_cast<const SquareOptions *>(obj); return ptr->UnPack(resolver); } + case BuiltinOptions_ZerosLikeOptions: { + auto ptr = reinterpret_cast<const ZerosLikeOptions *>(obj); + return ptr->UnPack(resolver); + } default: return nullptr; } } @@ -9787,6 +9886,10 @@ inline flatbuffers::Offset<void> BuiltinOptionsUnion::Pack(flatbuffers::FlatBuff auto ptr = reinterpret_cast<const SquareOptionsT *>(value); return CreateSquareOptions(_fbb, ptr, _rehasher).Union(); } + case BuiltinOptions_ZerosLikeOptions: { + auto ptr = reinterpret_cast<const ZerosLikeOptionsT *>(value); + return CreateZerosLikeOptions(_fbb, ptr, _rehasher).Union(); + } default: return 0; } } @@ -10057,6 +10160,10 @@ inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) FL value = new SquareOptionsT(*reinterpret_cast<SquareOptionsT *>(u.value)); break; } + case BuiltinOptions_ZerosLikeOptions: { + value = new ZerosLikeOptionsT(*reinterpret_cast<ZerosLikeOptionsT *>(u.value)); + break; + } default: break; } @@ -10394,6 +10501,11 @@ inline void BuiltinOptionsUnion::Reset() { delete ptr; break; } + case BuiltinOptions_ZerosLikeOptions: { + auto ptr = reinterpret_cast<ZerosLikeOptionsT *>(value); + delete ptr; + break; + } default: break; } value = nullptr; |