- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I try this tutorial to create my own inference engine.
When I try to create random input data to the inference_request, it can work normally.
random_input_data = np.random.randn(1, 3, 224, 224).astype(np.float16)
tensor_description = TensorDesc(precision="FP16", dims=(1, 3, 224, 224), layout='NCHW')
input_blobs = Blob(tensor_description, random_input_data)
But if I replace random_input_data with my real image path
random_input_data = np.array(r"C:\MyImagePath\XXX.png").astype(np.float16)
I get the error message
ValueError: could not convert string to float: 'C:\\MyImagePath\\XXX.png'
Why I cannot astype my real image to FP16?
(I use Windows 10 with openvino_2021.4.689)
1 Solution
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This case is similar to this StackOverflow thread.
Please help to refer to that thread since we had provided an answer there.
Sincerely,
Iffa
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
This case is similar to this StackOverflow thread.
Please help to refer to that thread since we had provided an answer there.
Sincerely,
Iffa
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page