torch2tflite
torch2tflite copied to clipboard
TypeError: 'tuple' object cannot be interpreted as an integer
I created below colab and getting below "TypeError: 'tuple' object cannot be interpreted as an integer" error. Could you please help me on this ? https://colab.research.google.com/drive/19JeOkrxlGP6KtkfGbrkO87COc4pvSZSE?usp=sharing#scrollTo=vdeytDxjFdZ3
Traceback (most recent call last):
File "/usr/lib/python3.7/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/usr/lib/python3.7/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/content/torch2tflite/torch2tflite/converter.py", line 187, in
@omerferhatt
Please use the below Colab to reproduce the issue https://colab.research.google.com/drive/1HZgkJRkvuX_6xhceQJGC6TW-zHYhA41a?usp=sharing
@nyadla-sys change type
in this line https://github.com/omerferhatt/torch2tflite/blob/6dac47aafffa9ec4093b3d420e2ac026a48b3192/torch2tflite/converter.py#L177
from tuple
to int
and run again.
Note: you will need to unzip the installed torch2tflite-1.0.0-py3.8.egg
file at your Python site-packages
folder using any unzipping tool (e.g. unzip
), make the modification above, compress all files again, and put the compressed files in the same path.