- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I would like check if there is any python API that we can use to validate if the data to be fed to NCS is of the right dimension/size of the graph.
We observe that when we feed an input of different dimension, the LoadTensor return True,
meaning a success of loading the data to the NCS and we are still able to obtain the results,
of course the output numbers are invalid float16 numbers and at times, the output is NAN.
Do the backend of LoadTensor or GetResult check the input dimension?
It seems reasonable that the API should do that internally since there is no indication to the developer that
the input dimension is wrong, and getting results give a wrong indication of "it is running/working"
unless the developer is aware of the network topology of the used graph
which could be delivered by third party in binary format and knowledge of input size may not be examined.
if I am missing out something, pls let me know. Thanks!
You may try out at your end with the snippet below.
for i in range(10):
img = np.random.rand(400, 400, 3).astype(np.float16) # pls set size to be different from required size
if graph.LoadTensor(img, 'user object'):
output, userobj = graph.GetResults()
print(output)
else:
print("Unable to load tensor")
Link Copied
0 Replies
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