return tflite.Pool2DOptions.Pool2DOptionsEnd(new_builder)
# SVDFOptions: not supported
- # RNNOptions: not supported
+
+ # RNNOptions
+ import tflite.RNNOptions
+ if builtin_option_type == tflite.BuiltinOptions.BuiltinOptions().RNNOptions:
+
+ add_option = tflite.RNNOptions.RNNOptions()
+ add_option.Init(selected_builtin_option.Bytes, selected_builtin_option.Pos)
+
+ tflite.RNNOptions.RNNOptionsStart(new_builder)
+ tflite.RNNOptions.RNNOptionsAddFusedActivationFunction(
+ new_builder, add_option.FusedActivationFunction())
+ return tflite.RNNOptions.RNNOptionsEnd(new_builder)
# FullyConnectedOptions
import tflite.FullyConnectedOptions