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

Segmentation fault (core dumped) when converting

Open Amadeus-AI opened this issue 2 years ago • 0 comments

Question

I'm converting a model made by google research https://storage.googleapis.com/cloud-tpu-checkpoints/detection/projects/fvlm/r50.zip

after unzip, python -m tf2onnx.convert --saved-model ./r50 --output model.onnx

it shows 2023-05-16 14:30:30,770 - WARNING - tf2onnx.tf_loader: '--tag' not specified for saved_model. Using --tag serve 2023-05-16 14:31:07,653 - INFO - tf2onnx.tf_loader: Signatures found in model: [serving_default]. 2023-05-16 14:31:07,654 - WARNING - tf2onnx.tf_loader: '--signature_def' not specified, using first signature: serving_default 2023-05-16 14:31:07,654 - INFO - tf2onnx.tf_loader: Output names: ['detection_boxes', 'detection_classes', 'detection_masks', 'detection_scores', 'num_detections'] Segmentation fault (core dumped)

Can anyone try to convert it and give me some feedback? Thanks a lot.

Other info

saved_model_cli of this model:

MetaGraphDef with tag-set: 'serve' contains the following SignatureDefs:

signature_def['__saved_model_init_op']:
  The given SavedModel SignatureDef contains the following input(s):
  The given SavedModel SignatureDef contains the following output(s):
    outputs['__saved_model_init_op'] tensor_info:
        dtype: DT_INVALID
        shape: unknown_rank
        name: NoOp
  Method name is: 

signature_def['serving_default']:
  The given SavedModel SignatureDef contains the following input(s):
    inputs['image'] tensor_info:
        dtype: DT_BFLOAT16
        shape: (1, 1024, 1024, 3)
        name: serving_default_image:0
    inputs['queries'] tensor_info:
        dtype: DT_FLOAT
        shape: (1, 91, 1024)
        name: serving_default_queries:0
  The given SavedModel SignatureDef contains the following output(s):
    outputs['detection_boxes'] tensor_info:
        dtype: DT_FLOAT
        shape: (1, 100, 4)
        name: StatefulPartitionedCall:0
    outputs['detection_classes'] tensor_info:
        dtype: DT_FLOAT
        shape: (1, 100)
        name: StatefulPartitionedCall:1
    outputs['detection_masks'] tensor_info:
        dtype: DT_FLOAT
        shape: (1, 100, 28, 28)
        name: StatefulPartitionedCall:2
    outputs['detection_scores'] tensor_info:
        dtype: DT_FLOAT
        shape: (1, 100)
        name: StatefulPartitionedCall:3
    outputs['num_detections'] tensor_info:
        dtype: DT_INT32
        shape: (1)
        name: StatefulPartitionedCall:4
  Method name is: tensorflow/serving/predict
The MetaGraph with tag set ['serve'] contains the following ops: {'PreventGradient', 'Neg', 'Reshape', 'StringJoin', 'Greater', 'ReadVariableOp', 'Transpose', 'StaticRegexFullMatch', 'Mul', 'RightShift', 'StridedSlice', 'BroadcastTo', 'XlaReduceWindow', 'Range', 'Pow', 'NoOp', 'LessEqual', 'LogicalOr', 'Equal', 'RealDiv', 'Less', 'LeftShift', 'Pack', 'MergeV2Checkpoints', 'Cast', 'Any', 'Sub', 'StatefulPartitionedCall', 'Sqrt', 'BitwiseXor', 'LogicalAnd', 'AddV2', 'RestoreV2', 'StopGradient', 'ConcatV2', 'ShardedFilename', 'AssignVariableOp', 'XlaDotV2', 'Exp', 'Select', 'Rsqrt', 'NotEqual', 'Max', 'SaveV2', 'StatelessWhile', 'Log', 'Abs', 'XlaGather', 'Sign', 'Maximum', 'VarHandleOp', 'SelectV2', 'Minimum', 'Const', 'GreaterEqual', 'BitwiseOr', 'XlaPad', 'Placeholder', 'BitwiseAnd', 'TopKV2', 'Floor', 'XlaConvV2', 'LogicalNot', 'Sum', 'Identity'}

Concrete Functions:
  Function Name: '__call__'
    Option #1
      Callable with:
        Argument #1
          DType: dict
          Value: {'text': TensorSpec(shape=(1, 91, 1024), dtype=tf.float32, name='queries'), 'image': TensorSpec(shape=(1, 1024, 1024, 3), dtype=tf.bfloat16, name='image')} 

Amadeus-AI avatar May 16 '23 06:05 Amadeus-AI