| 1331 | }; |
| 1332 | |
| 1333 | class ReduceProd |
| 1334 | : public BuiltinOperator<TensorFlowProdOperator, ::tflite::ReducerOptions, |
| 1335 | ::tflite::BuiltinOptions_ReducerOptions> { |
| 1336 | public: |
| 1337 | using BuiltinOperator::BuiltinOperator; |
| 1338 | flatbuffers::Offset<TfLiteOptions> WriteOptions( |
| 1339 | const TocoOperator& op, |
| 1340 | flatbuffers::FlatBufferBuilder* builder) const override { |
| 1341 | return ::tflite::CreateReducerOptions(*builder, op.keep_dims); |
| 1342 | } |
| 1343 | |
| 1344 | void ReadOptions(const TfLiteOptions& options, |
| 1345 | TocoOperator* op) const override { |
| 1346 | op->keep_dims = options.keep_dims(); |
| 1347 | } |
| 1348 | |
| 1349 | int GetVersion(const OperatorSignature& op_signature) const override { |
| 1350 | return 1; |
| 1351 | } |
| 1352 | }; |
| 1353 | |
| 1354 | class ReduceAny |
| 1355 | : public BuiltinOperator<TensorFlowAnyOperator, ::tflite::ReducerOptions, |