- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm a freshman and I want to run a TensorFlow implementation of MTCNN model(https://github.com/AITTSMD/MTCNN-Tensorflow) which has three networks in Movidius™ Neural Compute Stick.But when I generate a P-Net graph which is the first network from the PNet.meta file using mvNCCompile, the terminal reports an error: [Error 5] Toolkit Error: Stage Details Not Supported: Abs. I found some tf.abs() operations and abs() which from builtins.py in the MTCNN source codes(mtcnn_model.py). Doesn't NCSSDK support the abs operation?
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Linzai Can you provide the command that you are using with the PNET model?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
First I named the one of the output results "cls_prob_test" as tensor_output on line 161 in mtcnn_model.py:
line 161: cls_pro_test = tf.squeeze(conv4_1, axis=0,name = "cls_prob_test")
Then I use codes below to generate PNet.meta:
import tensorflow as tf
import sys
sys.path.append("../")
from train_models.mtcnn_model import P_Net
model_path = '../data/MTCNN_model/PNet_landmark/PNet-18'
graph = tf.Graph()
with graph.as_default():
image_op = tf.placeholder(tf.float32,[200,200,3], name='input')
image_reshape = tf.reshape(image_op, [1, 200, 200, 3])
cls_prob, bbox_pred, _ = P_Net(image_reshape, training=False)
sess = tf.Session(
config=tf.ConfigProto(allow_soft_placement=True, gpu_options=tf.GPUOptions(allow_growth=True)))
saver = tf.train.Saver()
# check whether the dictionary is valid
model_dict = '/'.join(model_path.split('/')[:-1])
ckpt = tf.train.get_checkpoint_state(model_dict)
print(model_path)
readstate = ckpt and ckpt.model_checkpoint_path
assert readstate, "the params dictionary is not valid"
print("restore models' param")
saver.restore(sess, model_path)
saver = tf.train.Saver(tf.global_variables())
saver.save(sess, "output/PNet" )
Finally ,I use mvNCCompile command:
mvNCCompile output/PNet.meta -s 12 -in=input -on=cls_prob_test -is 200 200 -o MTCNN.graph
But report an error:
[Error 5] Toolkit Error: Stage Details Not Supported: Abs
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @Tome_at_Intel ,I got a reply email from your company's engineers that say "we don’t support Abs op of TF now."
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You could do tf.nn.relu(x) + tf.nn.relu(-1*x)
Also, 1.11 may have fixed it? 1.11 fixed tf.div(x, y) for me.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
@Linzai Can you try this again with the latest SDK 1.11 and let me know if this fixes your problem? Thanks.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page