FlexVarHandleOp, FlexAssignVariableOp and While ops equivalent in TFLite micro

12 views
Skip to first unread message

Cris

unread,
Oct 12, 2021, 12:51:39 PMOct 12
to SIG Micro
Hi all,

I converted a TF model to be used with TFLite micro. This model uses a custom layer where there are some tf.Variable (instead of numpy arrays for partial computations) and for loops statements (implemented with tf.range, not tf.while_loop statements). I'm using weights chosen randomly for now. The custom layer is written in custom_layer.py.

From Netron (Netron.png image) I see the TFLite model uses FlexVarHandleOp and FlexAssignVariableOp: these ops are supported through AddVarHandle() and AddAssignVariable() which are in micro_mutable_op_resolver, right? Regarding While op, is it supported in TFLite micro? If not, is there a workaround to use it?




custom_layer.py
Netron.png

Cris

unread,
Oct 12, 2021, 1:02:57 PMOct 12
to SIG Micro, Cris
If I used tf.while_loop instead of tf.range to implement for loop statements, the TFLite model could change?
Reply all
Reply to author
Forward
0 new messages