You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2018/10/20 10:27:59 UTC

[GitHub] MyraBaba commented on issue #12869: Python trained model gives different features set in C++

MyraBaba commented on issue #12869: Python trained model gives different features set in C++
URL: https://github.com/apache/incubator-mxnet/issues/12869#issuecomment-431568530
 
 
   Hi
   @leleamol 
   
   System is Mac os X and also ubuntu 18
   build mxnet with cpp support
   
   We want to use Mxnet in our all production.
   
   We just stuck in first attemp :)
   
   https://github.com/deepinsight/insightface/blob/master/deploy/test.py this is the our first test.
   
   We can extract  feature in pyhton.
   
   We tried to use predict-cpp api to use model and extract future with same model above first message .
   
   c++ image-classification-predict-cpp we put same model same picture in the above repo Tom-hanks.
   
   it gives different outpu (512D but different float numbers).
   
   Clearly we are missing something because we are new to mxnet .
   
   Basically ; We want to this in c++ as  in python  and want to get same features: 
   
   img = cv2.imread('Tom_Hanks_54745.png')
   img = cv2.resize(img , (112,112))
   
   img = model.get_input(img)
   f2 = model.get_feature(img)
   dist = np.sum(np.square(f1-f2))
   sim = np.dot(f1, f2.T)
   
   Best...
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services