Community
cancel
Showing results for 
Search instead for 
Did you mean: 
lin__dia
Beginner
66 Views

Neural Network Output from Myraid X is incorrect

I try to make a experiment of implementing "multitask" network on Myraid X, but I get the wrong output. Following are my steps to get the incorrect output.

I use an age classification implemented on Caffe as my experiment which contains the prototxt and weights.

I also upload the modified prototxt and caffemodel.

I made some modification of the prototxt by copying the last fc layer 'fc8' as following to create a two tasks network,

layers {
  name: "fc8"
  type: INNER_PRODUCT
  bottom: "fc7"
  top: "fc8"
  inner_product_param {
    num_output: 8
  }
}
layers {
  name: "prob"
  type: SOFTMAX
  bottom: "fc8"
  top: "prob"
}
layers {
  name: "copy_fc8"
  type: INNER_PRODUCT
  bottom: "fc7"
  top: "copy_fc8"
  inner_product_param {
    num_output: 8
  }
}
layers {
  name: "copy_prob"
  type: SOFTMAX
  bottom: "copy_fc8"
  top: "copy_prob"
}

Then I make the weights of above layer 'fc8' and 'copy_fc8' same, therefore, I should get the sample output from these two softmax output.

My input image is downloaded from google image search.

1.

I use model optimizer of R4 to convert the caffe model to get IR model and run it on Myraid 2.

I get the two same outputs of the input image as expectation,

copy_fc8: 
[ INFO ] -------
[ INFO ] 0.000357389
[ INFO ] 0.00239372
[ INFO ] 0.0594482
[ INFO ] 0.0129318
[ INFO ] 0.273193
[ INFO ] 0.260742
[ INFO ] 0.0244904
[ INFO ] 0.366211
fc8: 
[ INFO ] -------
[ INFO ] 0.000357389
[ INFO ] 0.00239372
[ INFO ] 0.0594482
[ INFO ] 0.0129318
[ INFO ] 0.273193
[ INFO ] 0.260742
[ INFO ] 0.0244904
[ INFO ] 0.366211

2.

I use model optimizer of R4 to convert the caffe model to get IR model and run it on Myraid X.

I get the two different outputs of the input image and the output from 'copy_fc8' seems correct which is similar to the experiment 1.,

copy_fc8: 
[ INFO ] -------
[ INFO ] 0.00031805
[ INFO ] 0.00197792
[ INFO ] 0.0588989
[ INFO ] 0.0136337
[ INFO ] 0.271484
[ INFO ] 0.260742
[ INFO ] 0.0244141
[ INFO ] 0.368896
fc8: 
[ INFO ] -------
[ INFO ] 0.0452271
[ INFO ] 0.039978
[ INFO ] 0.0336609
[ INFO ] 0.108032
[ INFO ] 0.300049
[ INFO ] 0.322998
[ INFO ] 0.10144
[ INFO ] 0.0483398

3.

I use model optimizer of R5 to convert the caffe model to get IR model and run it on Myraid 2.

I also get the two same outputs of the input image as expectation,

copy_fc8: 
[ INFO ] -------
[ INFO ] 0.000357389
[ INFO ] 0.00239372
[ INFO ] 0.0594482
[ INFO ] 0.0129318
[ INFO ] 0.273193
[ INFO ] 0.260742
[ INFO ] 0.0244904
[ INFO ] 0.366211
fc8: 
[ INFO ] -------
[ INFO ] 0.000357389
[ INFO ] 0.00239372
[ INFO ] 0.0594482
[ INFO ] 0.0129318
[ INFO ] 0.273193
[ INFO ] 0.260742
[ INFO ] 0.0244904
[ INFO ] 0.366211

4.

I use model optimizer of R5 to convert the caffe model to get IR model and run it on Myraid X.

I also get the two different outputs of the input image and all outputs are different from the experiment 2.,

copy_fc8: 
[ INFO ] -------
[ INFO ] 0.00029707
[ INFO ] 0.000290632
[ INFO ] 0.00393295
[ INFO ] 0.0123291
[ INFO ] 0.0689697
[ INFO ] 0.652832
[ INFO ] 0.0205231
[ INFO ] 0.240723
fc8: 
[ INFO ] -------
[ INFO ] 0.0509949
[ INFO ] 0.0478516
[ INFO ] 0.0298309
[ INFO ] 0.104431
[ INFO ] 0.28833
[ INFO ] 0.334717
[ INFO ] 0.0968628
[ INFO ] 0.046936

Why did I get the different outputs when I run the model of R4 or R5 on Myraid X?

It seems that the problem is incurred by Myraid X since the output looks fine on Myraid 2 no matter what the API version is.

0 Kudos
0 Replies
Reply