Closed MaratZakirov closed 4 years ago
@MaratZakirov Yes, forgot to transfer the attributes for the Conv2D layer. I added the fix to the script. As for the Dilation2D
error look at the solution from https://github.com/tensorflow/tensorflow/issues/38102 maybe that helps:
converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS,
tf.lite.OpsSet.SELECT_TF_OPS]
Let me know if that works for you.
@MaratZakirov Yes, forgot to transfer the attributes for the Conv2D layer. I added the fix to the script. As for the
Dilation2D
error look at the solution from tensorflow/tensorflow#38102 maybe that helps:converter.target_spec.supported_ops = [tf.lite.OpsSet.TFLITE_BUILTINS, tf.lite.OpsSet.SELECT_TF_OPS]
Let me know if that works for you.
I currently used New fix from onnx_tf contributor #613 it sems work ok for me, but I am still in transition path between pytorch yolo3 to tflite.
Alright, in this case I would close the issue. Feel free to reopen it, if any other error occurs with this script.
Alright, in this case I would close the issue. Feel free to reopen it, if any other error occurs with this script.
@paulbauriegel Have you ever seen pytorch F.interpolate
conversion to TFlite issue?
Somehow I have it and then I tried to make its analog to avoid TFlite converter 'If convertion error' using torch.view I obtain 'Segmentaion fault' from same converter.
@MaratZakirov From pytorch to onnx
or from onnx to tensorflow
or from tensorflow to tflite
. I'm not sure what kind of workflow you have so it's hard to help.
@MaratZakirov From
pytorch to onnx
or fromonnx to tensorflow
or fromtensorflow to tflite
. I'm not sure what kind of workflow you have so it's hard to help.
My workflow is pytorch - onnx - pb - tflite. Pb file exucutes correctly in all cases, all problem I have currently in tflite converter
I failed to use your script as is, because of
aasert out_trans.shape == sess.graph.get_tensor_by_name(n_org.name+':0').shape
failure When I instigate the issue I found that somehowop = sess.graph.create_op(op_type=n_org.type, inputs=op_inputs, name=n_org.name+'_new', attrs=atts)
ignores the first batch dimension so shit bellow helpsAfter _toco model "succesfully" generated on the tflite generation phase I face weird problem
Here is a list of operators for which you will need custom implementations: Dilation2D.
Which is strange because resnet18 does not have any fancy dilation values (Conv2d has dilation = 1)