google-coral / pycoral

Python API for ML inferencing and transfer-learning on Coral devices
https://coral.ai
Apache License 2.0
347 stars 144 forks source link

common input size expects 4 values #95

Closed marinakrcek closed 1 year ago

marinakrcek commented 1 year ago

Description

from pycoral.adapters import common size = common.input_size(interpreter)

implementation expects 4 values for the shape, while MLP can can have shape with just, for example, 1 x height x width of the picture. This is the implementation that throws the error then: , height, width, = input_details(interpreter, 'shape') ValueError: not enough values to unpack (expected 4, got 3)

Why is that the case?

I use the latest version:

pycoral.version '2.0.0'

Click to expand! ### Issue Type _No response_ ### Operating System Windows 10, Debian (RPi 4) ### Coral Device USB Accelerator ### Other Devices _No response_ ### Programming Language Python ### Relevant Log Output _No response_
hjonnala commented 1 year ago

Please try size = interpreter.get_input_details()[0]['shape']

google-coral-bot[bot] commented 1 year ago

Are you satisfied with the resolution of your issue? Yes No