Community
cancel
Showing results for 
Search instead for 
Did you mean: 
idata
Community Manager
429 Views

Depthwise Conv Not Working Correctly

I am using Tensorflow 1.9.0 and NCSDK (v2) v2.8.1.2 in Ubuntu 16.04.

 

============================================================================================

 

I have the very simple tensorflow graph:

 

import tensorflow as tf

 

import numpy as np

 

import sys

 

inputs = tf.placeholder(tf.float32, (1,402,202,60), name="input")

 

weights = tf.get_variable("weights", [3, 3, 60, 1], dtype=tf.float32, initializer=tf.random_uniform_initializer)

 

outputs = tf.nn.depthwise_conv2d(inputs, weights, [1, 1, 1, 1], "VALID", name="output", data_format='NHWC')

 

testIn = np.ones((1,402,202,60))

 

saver = tf.train.Saver()

 

with tf.Session() as sess:

 

…………sess.run(tf.global_variables_initializer())

 

…………tfOut = sess.run(outputs, feed_dict={inputs:testIn})

 

…………save_path = saver.save(sess, "./testGraph/depthwise")

 

print(tfOut.shape)

 

============================================================================================

 

The tensorflow program runs OK and created the "meta" graph in "./testGraph/depthwise.meta"

 

Now, when I run the following commands:

 

"cd testGraph && mvNCCheck depthwise.meta -s 12 -in input -on output"

 

I got the following output:

 

============================================================================================

 

mvNCCheck v02.00, Copyright @ Intel Corporation 2017

 

_* Info: No Weights provided. inferred path: depthwise.data-00000-of-00001_*

 

shape: (1, 402, 202, 60)

 

res.shape: (1, 400, 200, 60)

 

TensorFlow output shape: (400, 200, 60)

 

Blob generated

 

USB: Transferring Data…

 

/usr/lib/python3.5/site-packages/mvnc/mvncapi.py:418: DeprecationWarning: The binary mode of fromstring is deprecated, as it behaves surprisingly on unicode inputs. Use frombuffer instead

 

USB: Myriad Execution Finished

 

USB: Myriad Connection Closing.

 

USB: Myriad Connection Closed.

 

Result: (400, 200, 60)

 

1) 2219925 6.094

 

2) 4589229 5.863

 

3) 3984105 5.82

 

4) 480525 5.773

 

5) 1113525 5.73

 

Expected: (400, 200, 60)

 

1) 2219925 6.0941

 

2) 4589229 5.863187

 

3) 3984105 5.821101

 

4) 480525 5.773321

 

5) 1113525 5.7299337

 

 

Obtained values

 

 

Obtained Min Pixel Accuracy: 68.20873022079468% (max allowed=2%), Fail

 

Obtained Average Pixel Accuracy: 2.201648987829685% (max allowed=1%), Fail

 

Obtained Percentage of wrong values: 6.6650625% (max allowed=0%), Fail

 

Obtained Pixel-wise L2 error: 8.806281379565066% (max allowed=1%), Fail

 

Obtained Global Sum Difference: 644019.375

 

 

============================================================================================

 

Noticed that, there are lots of errors in the sum of difference and most of the test have failed. I am using the 3x3 depthwise filter in this case.

 

Any ideas on how to address this issue in the NCS???

 

Thanks a lot for all the helps and supports….

0 Kudos
0 Replies
Reply