You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Converted TensorFlow model to ONNX over this command python -m tf2onnx.convert --saved-model ./checkpoints/yolov4.tf --output model.onnx --opset 11 --verbose and then imported the output file and then i changed the input and output from the sample provided by Microsoft
What happened?
This is the output
Model location: .....assets\Model\nsfw_mobilenet.onnx
Default parameters: image size=(416,416)
System.InvalidOperationException: Input shape mismatch: Input 'input' has shape 1,224,224,3, but input data is of length 519168.
at Microsoft.ML.Transforms.Onnx.OnnxTransformer.Mapper..ctor(OnnxTransformer parent, DataViewSchema inputSchema)
at Microsoft.ML.Transforms.Onnx.OnnxTransformer.MakeRowMapper(DataViewSchema inputSchema)
at Microsoft.ML.Data.RowToRowTransformerBase.GetOutputSchema(DataViewSchema inputSchema)
at Microsoft.ML.Data.TrivialEstimator1.Fit(IDataView input) at Microsoft.ML.Data.EstimatorChain1.Fit(IDataView input)
at ObjectDetection.OnnxModelScorer.LoadModel(String modelLocation) in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\OnnxModelScorer.cs:line 63
at ObjectDetection.OnnxModelScorer.Score(IDataView data) in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\OnnxModelScorer.cs:line 84
at ObjectDetection.Program.Main() in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\Program.cs:line 36
========= End of Process..Hit any Key ========
System information
Issue
What did you do?
Converted TensorFlow model to ONNX over this command python -m tf2onnx.convert --saved-model ./checkpoints/yolov4.tf --output model.onnx --opset 11 --verbose and then imported the output file and then i changed the input and output from the sample provided by Microsoft
What happened?
This is the output
Model location: .....assets\Model\nsfw_mobilenet.onnx
Default parameters: image size=(416,416)
System.InvalidOperationException: Input shape mismatch: Input 'input' has shape 1,224,224,3, but input data is of length 519168.
at Microsoft.ML.Transforms.Onnx.OnnxTransformer.Mapper..ctor(OnnxTransformer parent, DataViewSchema inputSchema)
at Microsoft.ML.Transforms.Onnx.OnnxTransformer.MakeRowMapper(DataViewSchema inputSchema)
at Microsoft.ML.Data.RowToRowTransformerBase.GetOutputSchema(DataViewSchema inputSchema)
at Microsoft.ML.Data.TrivialEstimator
1.Fit(IDataView input) at Microsoft.ML.Data.EstimatorChain
1.Fit(IDataView input)at ObjectDetection.OnnxModelScorer.LoadModel(String modelLocation) in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\OnnxModelScorer.cs:line 63
at ObjectDetection.OnnxModelScorer.Score(IDataView data) in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\OnnxModelScorer.cs:line 84
at ObjectDetection.Program.Main() in Downloads\machinelearning_samples\machinelearning\samples\csharp\getting-started\DeepLearning_ObjectDetection_Onnx\ObjectDetectionConsoleApp\Program.cs:line 36
========= End of Process..Hit any Key ========
What did you expect?
it should work
and here is the onnx file
nsfw_mobilenet.zip
Source code / logs
Please paste or attach the code or logs or traces that would be helpful to diagnose the issue you are reporting.
The text was updated successfully, but these errors were encountered: