Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while trying to convert to tflite #9

Open
mix0z opened this issue Jul 29, 2022 · 0 comments
Open

Error while trying to convert to tflite #9

mix0z opened this issue Jul 29, 2022 · 0 comments

Comments

@mix0z
Copy link

mix0z commented Jul 29, 2022

When I'm trying to run export.py, even with default parameters I got this error

Traceback (most recent call last):
  File "/Users/mix0z/movenet-pytorch/export.py", line 102, in <module>
    main()
  File "/Users/mix0z/movenet-pytorch/export.py", line 46, in main
    converter.convert()
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/base.py", line 256, in convert
    self.init_operations()
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/base.py", line 226, in init_operations
    converter.parse(node, attrs, args, self.common_graph)
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/operators/torch/aten.py", line 421, in parse
    self.run(node)
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/operators/torch/base.py", line 128, in run
    o = func(**kwargs)
TypeError: 'tuple' object is not callable

I tried to update to the last version of TinyNeuralNetwork, but I got another error

Traceback (most recent call last):
  File "/Users/mix0z/movenet-pytorch/export.py", line 102, in <module>
    main()
  File "/Users/mix0z/movenet-pytorch/export.py", line 46, in main
    converter.convert()
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/base.py", line 429, in convert
    optimizer.optimize()
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/operators/optimize.py", line 2745, in optimize
    r_count = self.elementwise_op_reshape_passthrough_pass()
  File "/opt/homebrew/lib/python3.9/site-packages/TinyNeuralNetwork-0.1.0.20220729125527+d2f468a06cda4a040dc36f4cbb42f5d5fe948ccf-py3.9.egg/tinynn/util/util.py", line 180, in wrapper
    return f(*args, **kwds)
  File "/Users/mix0z/movenet-pytorch/TinyNeuralNetwork/tinynn/converter/operators/optimize.py", line 1745, in elementwise_op_reshape_passthrough_pass
    np.reshape(op_out.tensor, prev_shape), quantization=op_out.quantization
  File "<__array_function__ internals>", line 180, in reshape
  File "/opt/homebrew/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 298, in reshape
    return _wrapfunc(a, 'reshape', newshape, order=order)
  File "/opt/homebrew/lib/python3.9/site-packages/numpy/core/fromnumeric.py", line 57, in _wrapfunc
    return bound(*args, **kwds)
ValueError: cannot reshape array of size 34 into shape (1,1)

I didn't change anything in repo.

Running code on mac m1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant