Open fantasyRqg opened 4 years ago
Not sure whether it helps but have you tried logging like in #818 to gain further insights ?
use CoreML::Model
load spec with some layer unsupport modification. I can print output blobs shape.
all seems OK .
when use Apple MLModel::compileModelAtURL
still produce error
error: Error compiling model: "compiler error: Espresso exception: "Invalid state": generic_split_kernel: Number of top blobs in split kernel does not evenly divide width axis."
error message is so vague. And no way show verbose info about layers output/input shape when compile model.😭
builder.inspect_layers
message here. asking for help
/Users/rqg/Playground/coremltools/envs/coremltools-py3.7/bin/python3.7 /Users/rqg/PycharmProjects/CoreML/Convertfd.py
4.0b3
(4, 14280, 1)
(2, 14280, 1)
(2, 14280, 1)
[Id: 11], Name: nms (Type: NonMaximumSuppression)
Updatable: False
Input blobs: ['decoded_bbox_out', 'scores']
Output blobs: ['coordinates', 'confidence', 'nms_indices', 'nms_number']
Parameters:
iouThreshold = 0.30000001192092896
scoreThreshold = 0.05000000074505806
maxBoxes = 200
perClassSuppression = False
[Id: 10], Name: decoded_bbox (Type: concat)
Updatable: False
Input blobs: ['bbox_xy_a_out', 'bbox_wh_m_m_out']
Output blobs: ['decoded_bbox_out']
Parameters:
sequenceConcat = False
[Id: 9], Name: bbox_wh_m_m (Type: multiply)
Updatable: False
Input blobs: ['bbox_wh_e_out', 'prior_wh_out']
Output blobs: ['bbox_wh_m_m_out']
Parameters:
alpha = 0.0
[Id: 8], Name: bbox_wh_e (Type: unary)
Updatable: False
Input blobs: ['bbox_wh_m_out']
Output blobs: ['bbox_wh_e_out']
Parameters:
type = 4
alpha = 1.0
epsilon = 9.999999974752427e-07
shift = 0.0
scale = 1.0
[Id: 7], Name: bbox_wh_m (Type: multiply)
Updatable: False
Input blobs: ['split_variances_wh', 'split_box_max_out']
Output blobs: ['bbox_wh_m_out']
Parameters:
alpha = 0.0
[Id: 6], Name: bbox_xy_a (Type: add)
Updatable: False
Input blobs: ['bbox_xy_m_out', 'prior_xy_out']
Output blobs: ['bbox_xy_a_out']
Parameters:
alpha = 0.0
[Id: 5], Name: bbox_xy_m (Type: multiply)
Updatable: False
Input blobs: ['split_variances_xy', 'split_box_min_out', 'prior_wh_out']
Output blobs: ['bbox_xy_m_out']
Parameters:
alpha = 0.0
[Id: 4], Name: split_box (Type: split)
Updatable: False
Input blobs: ['boxes']
Output blobs: ['split_box_min_out', 'split_box_max_out']
Parameters:
nOutputs = 2
[Id: 3], Name: split_variances (Type: split)
Updatable: False
Input blobs: ['prior_variances_out']
Output blobs: ['split_variances_xy', 'split_variances_wh']
Parameters:
nOutputs = 2
[Id: 2], Name: prior_variances (Type: loadConstant)
Updatable: False
Input blobs: []
Output blobs: ['prior_variances_out']
Parameters:
shape = [4, 14280, 1]
data = (57120 floatValues)
[Id: 1], Name: prior_xy (Type: loadConstant)
Updatable: False
Input blobs: []
Output blobs: ['prior_xy_out']
Parameters:
shape = [2, 14280, 1]
data = (28560 floatValues)
[Id: 0], Name: prior_wh (Type: loadConstant)
Updatable: False
Input blobs: []
Output blobs: ['prior_wh_out']
Parameters:
shape = [2, 14280, 1]
data = (28560 floatValues)
/Users/rqg/Playground/coremltools/coremltools/models/model.py:119: RuntimeWarning: You will not be able to run predict() on this Core ML model. Underlying exception message was: Error compiling model: "compiler error: Espresso exception: "Invalid state": generic_split_kernel: Number of top blobs in split kernel does not evenly divide width axis.".
RuntimeWarning,
I got the same issue as well.
Any update?? @jakesabathia2 @fantasyRqg
Was hunting down for a solution when I got here. One way to do it seems to be rewriting this Swift function in Python:
❓Question
How to print model layers shape
Use
neural_network.NeuralNetworkBuilder
built a model spec.when use spec new
MLModel
produce an error: "compiler error: Espresso exception: "Invalid blob shape": generic_elementwise_kernel: cannot broadcast [1, 14280, 2, 1, 1] and [14280, 2, 1, 1, 1]".print spec just some layer connection. no shape info.
I'm using coremltools build a model decode bbox like sdd-caffe does.
System Information
Code