- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I examined ncapi/py_examples/classification_example.py
As a input data, image data was converted to float16 data.
graph.LoadTensor(img.astype(numpy.float16), 'user object') # <- sample cord
this is ok, I got correct result
prediction 1 is n02123045 tabby, tabby cat
prediction 2 is n02124075 Egyptian cat
prediction 3 is n02127052 lynx, catamount
prediction 4 is n02123394 Persian cat
prediction 5 is n02971356 carton
when I use "graph.LoadTensor(img.astype(numpy.float32), 'user object')",
I got wrong result NAN array.
But original caffemodel (bvlc_alexnet.caffemodel) uses float32 data.
Does the network converted from float32 calculation model to float16, when compiled? (with mvNCCompile.pyc)
Is there a way to calculate it with float32?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@skymapnote The NCS is designed to use float16 input data, so when using mvNCCompile.pyc to compile a network for use with the NCS, the resulting graph file expects float16 input data. This results in having to convert your input data to half precision float 16 values before calling LoadTensor in your inference application.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel according to https://uploads.movidius.com/1463156689-2016-04-29_VPU_ProductBrief.pdf myriad2 supports half- and full-precision for both integer and float operation - why is NCS limited to half?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@macsz Hi macsz. We made a product decision to support only half precision floats for the NCS in order to optimize the NCS for accuracy, power and performance.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Tome_at_Intel thank you for the answer :)
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page