onnx-coreml icon indicating copy to clipboard operation
onnx-coreml copied to clipboard

output_feature has no shape when output has len(shape)==2

Open yuvdar opened this issue 6 years ago • 4 comments

❓Question

in _make_coreml_output_features in converter.py you don't allow shape of 2 (B, C), why is it? this is quite common in classification networks (such as mobileNet).

yuvdar avatar Oct 23 '19 12:10 yuvdar

@yuvdar we do handle output of rank 2 convert adds output feature with shape none is that case. Have you encountered any case we don't handle this? please share an example if that's the case

bhushan23 avatar Jan 03 '20 10:01 bhushan23

@bhushan23 - Thanks for the reply. This is indeed the case. My question is why not give out the correct output shape? None is not informative.

yuvdar avatar Jan 05 '20 10:01 yuvdar

@yuvdar when you set None, output shape will be inferred

bhushan23 avatar Jan 12 '20 22:01 bhushan23

@bhushan23 The problem is, there is no way of knowing the shape before inference. The metadata doesn't provide it, while in other cases it does.

yuvdar avatar Jan 14 '20 20:01 yuvdar