Intel® Distribution of OpenVINO™ Toolkit
Community assistance about the Intel® Distribution of OpenVINO™ toolkit, OpenCV, and all aspects of computer vision-related on Intel® platforms.
6403 Discussions

What are the steps to migrate my TF trained model to the NCSv1?

idata
Employee
1,137 Views

I know people have asked this already but i dont seem to find the real steps as everybody goes in a different way or i dont understart A.I good enough :sweat_smile:

 

So i used tensorflow 1.9 to train my model, i am using the train.py (legacy) and also tried with model_main.py (new script) both located in the …/research/object_detection folder from Tensorflow.

 

When training finishes a frozen graph is generated but i dont understand why that one doesnt work.

 

I am using SSD_inceptionV2_coco latest release on tf github. The trained model works great using just tensorflow code but if i tried to get the GRAPH file for the NCS it fails everytime, i am just not able to find the input and output nodes that work properly, there is alot on the internet to get those but i dont think i am doing it write.

 

I followed this guide: https://movidius.github.io/ncsdk/tf_modelzoo.html

 

But it seems it works only for the models in ncappzoo, i tried the commands in the site and worked fine. so i could get the GRAPH file. my ssd_inceptionv2_coco failed :(

 

So i check this link:

 

https://movidius.github.io/ncsdk/tf_slim.html

 

But the code dont seem to work with the model.ckpt-200000

 

This is my code:

 

----------------------------------------------------------------------CODE----------------------------------------------------------------------------------------------------------------------------

 

import numpy as np

 

import tensorflow as tf

 

from tensorflow.contrib.slim.nets import inception

 

slim = tf.contrib.slim

 

def run(name, image_size, num_classes):

 

with tf.Graph().as_default():

 

image = tf.placeholder("float", [1, image_size, image_size, 3], name="input")

 

with slim.arg_scope(inception.inception_v1_arg_scope()):

 

logits, _ = inception.inception_v1(image, num_classes, is_training=False, spatial_squeeze=False)

 

probabilities = tf.nn.softmax(logits)

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

with tf.Session() as sess: init_fn(sess) saver = tf.train.Saver(tf.global_variables()) saver.save(sess, "output/"+name)

 

run('inception-v2', 299, 2)

 

I just dont know what to use for model variables, InceptionV2 gets me

 

--------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 14, in run

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 678, in assign_from_checkpoint_fn

 

raise ValueError('var_list cannot be empty')

 

ValueError: var_list cannot be empty

 

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

 

So what am i missing? do i need to move to OpenVino? in order for this to work?

 

Do i need to train my model with tf_slim as mandatory step for NCSv1?

 

What am i missing? i have been using pretrained models with the NCSv1 and it work great for my security cameras, now i want to automate my house but i need a custom model but i just cant make it work with NCS. using a desktop is just to much resources for a smarthouse and alot of power and money as i might need the Nvidia card. So please allow me to keep playing with this device. love it.
0 Kudos
14 Replies
idata
Employee
713 Views

I know people have asked this already but i dont seem to find the real steps as everybody goes in a different way or i dont understart A.I good enough :sweat_smile:

 

So i used tensorflow 1.9 to train my model, i am using the train.py (legacy) and also tried with model_main.py (new script) both located in the …/research/object_detection folder from Tensorflow.

 

When training finishes a frozen graph is generated but i dont understand why that one doesnt work.

 

I am using SSD_inceptionV2_coco latest release on tf github. The trained model works great using just tensorflow code but if i tried to get the GRAPH file for the NCS it fails everytime, i am just not able to find the input and output nodes that work properly, there is alot on the internet to get those but i dont think i am doing it write.

 

I followed this guide: https://movidius.github.io/ncsdk/tf_modelzoo.html

 

But it seems it works only for the models in ncappzoo, i tried the commands in the site and worked fine. so i could get the GRAPH file. my ssd_inceptionv2_coco failed :(

 

So i check this link:

 

https://movidius.github.io/ncsdk/tf_slim.html

 

But the code dont seem to work with the model.ckpt-200000

 

This is my code:

 

----------------------------------------------------------------------CODE----------------------------------------------------------------------------------------------------------------------------

 

import numpy as np

 

import tensorflow as tf

 

from tensorflow.contrib.slim.nets import inception

 

slim = tf.contrib.slim

 

def run(name, image_size, num_classes):

 

with tf.Graph().as_default():

 

image = tf.placeholder("float", [1, image_size, image_size, 3], name="input")

 

with slim.arg_scope(inception.inception_v1_arg_scope()):

 

logits, _ = inception.inception_v1(image, num_classes, is_training=False, spatial_squeeze=False)

 

probabilities = tf.nn.softmax(logits)

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

with tf.Session() as sess: init_fn(sess) saver = tf.train.Saver(tf.global_variables()) saver.save(sess, "output/"+name)

 

run('inception-v2', 299, 2)

 

I just dont know what to use for model variables, InceptionV2 gets me

 

--------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 14, in run

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 678, in assign_from_checkpoint_fn

 

raise ValueError('var_list cannot be empty')

 

ValueError: var_list cannot be empty

 

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

 

So what am i missing? do i need to move to OpenVino? in order for this to work?

 

Do i need to train my model with tf_slim as mandatory step for NCSv1?

 

What am i missing? i have been using pretrained models with the NCSv1 and it work great for my security cameras, now i want to automate my house but i need a custom model but i just cant make it work with NCS. using a desktop is just to much resources for a smarthouse and alot of power and money as i might need the Nvidia card. So please allow me to keep playing with this device. love it.
0 Kudos
idata
Employee
713 Views

What is going on my post is just blank and it quite big why i dont see my post?

0 Kudos
idata
Employee
713 Views

My post are showing blank, no idea why so ill do multicomments:

 

I know people have asked this already but i dont seem to find the real steps as everybody goes in a different way or i dont understart A.I good enough :sweat_smile:

 

So i used tensorflow 1.9 to train my model, i am using the train.py (legacy) and also tried with model_main.py (new script) both located in the …/research/object_detection folder from Tensorflow.

 

When training finishes a frozen graph is generated but i dont understand why that one doesnt work.

 

I am using SSD_inceptionV2_coco latest release on tf github. The trained model works great using just tensorflow code but if i tried to get the GRAPH file for the NCS it fails everytime, i am just not able to find the input and output nodes that work properly, there is alot on the internet to get those but i dont think i am doing it write.

 

I followed this guide: https://movidius.github.io/ncsdk/tf_modelzoo.html

 

But it seems it works only for the models in ncappzoo, i tried the commands in the site and worked fine. so i could get the GRAPH file. my ssd_inceptionv2_coco failed :(

 

So i check this link:

 

https://movidius.github.io/ncsdk/tf_slim.html

 

But the code dont seem to work with the model.ckpt-200000

0 Kudos
idata
Employee
713 Views

This is my code:

 

----------------------------------------------------------------------CODE----------------------------------------------------------------------------------------------------------------------------

 

import numpy as np

 

import tensorflow as tf

 

from tensorflow.contrib.slim.nets import inception

 

slim = tf.contrib.slim

 

def run(name, image_size, num_classes):

 

with tf.Graph().as_default():

 

image = tf.placeholder("float", [1, image_size, image_size, 3], name="input")

 

with slim.arg_scope(inception.inception_v1_arg_scope()):

 

logits, _ = inception.inception_v1(image, num_classes, is_training=False, spatial_squeeze=False)

 

probabilities = tf.nn.softmax(logits)

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

with tf.Session() as sess: init_fn(sess) saver = tf.train.Saver(tf.global_variables()) saver.save(sess, "output/"+name)

 

run('inception-v2', 299, 2)

 

I just dont know what to use for model variables, InceptionV2 gets me

 

--------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------
0 Kudos
idata
Employee
713 Views

--------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 14, in run

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 678, in assign_from_checkpoint_fn

 

raise ValueError('var_list cannot be empty')

 

ValueError: var_list cannot be empty

 

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().

 

So what am i missing? do i need to move to OpenVino? in order for this to work?

 

Do i need to train my model with tf_slim as mandatory step for NCSv1?

 

What am i missing? i have been using pretrained models with the NCSv1 and it work great for my security cameras, now i want to automate my house but i need a custom model but i just cant make it work with NCS. using a desktop is just to much resources for a smarthouse and alot of power and money as i might need the Nvidia card. So please allow me to keep playing with this device. love it.
0 Kudos
idata
Employee
713 Views

--------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 14, in run

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 678, in assign_from_checkpoint_fn

 

raise ValueError('var_list cannot be empty')

 

ValueError: var_list cannot be empty

 

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
0 Kudos
idata
Employee
713 Views

-------------------------------------------------------------------OUTPUT1----------------------------------------------------------------------------------------------------------------

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 14, in run

 

init_fn = slim.assign_from_checkpoint_fn('model.ckpt-200000', slim.get_model_variables('InceptionV2'))

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 678, in assign_from_checkpoint_fn

 

raise ValueError('var_list cannot be empty')

 

ValueError: var_list cannot be empty
0 Kudos
idata
Employee
713 Views

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)

 

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
0 Kudos
idata
Employee
713 Views

---------------------------------------------------------------------OUTPUT2---------------------------------------------------------------------------------------------------------------

 

i tried InceptionV1 and worked a bit better but i know that is not the option for sure:

 

2019-01-05 04:41:01.150820: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA

 

2019-01-05 04:41:01.220727: I tensorflow/stream_executor/cuda/cuda_gpu_executor.cc:897] successful NUMA node read from SysFS had negative value (-1), but there must be at least one NUMA node, so returning NUMA node zero

 

2019-01-05 04:41:01.221057: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1392] Found device 0 with properties:

 

name: GeForce GTX 970 major: 5 minor: 2 memoryClockRate(GHz): 1.342

 

pciBusID: 0000:01:00.0

 

totalMemory: 3.94GiB freeMemory: 3.40GiB

 

2019-01-05 04:41:01.221070: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1471] Adding visible gpu devices: 0

 

2019-01-05 04:41:01.398357: I tensorflow/core/common_runtime/gpu/gpu_device.cc:952] Device interconnect StreamExecutor with strength 1 edge matrix:

 

2019-01-05 04:41:01.398383: I tensorflow/core/common_runtime/gpu/gpu_device.cc:958] 0

 

2019-01-05 04:41:01.398388: I tensorflow/core/common_runtime/gpu/gpu_device.cc:971] 0: N

 

2019-01-05 04:41:01.398500: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1084] Created TensorFlow device (/job:localhost/replica:0/task:0/device:GPU:0 with 3121 MB memory) -> physical GPU (device: 0, name: GeForce GTX 970, pci bus id: 0000:01:00.0, compute capability: 5.2)
0 Kudos
idata
Employee
713 Views

Traceback (most recent call last):

 

File "tf_slim_export.py", line 21, in

 

run('inception-v2', 299, 2)

 

File "tf_slim_export.py", line 17, in run

 

init_fn(sess)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback

 

saver.restore(session, model_path)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore

 

{self.saver_def.filename_tensor_name: save_path})

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run

 

run_metadata_ptr)

 

File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run

 

raise RuntimeError('The Session graph is empty. Add operations to the '

 

RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
0 Kudos
idata
Employee
713 Views

     

  1. 1. Traceback (most recent call last):
  2.  

  3. 2. File "tf_slim_export.py", line 21, in
  4.  

  5. 3. run('inception-v2', 299, 2)
  6.  

  7. 4. File "tf_slim_export.py", line 17, in run
  8.  

  9. 5. init_fn(sess)
  10.  

  11. 6. File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/contrib/framework/python/ops/variables.py", line 697, in callback
  12.  

  13. 7. saver.restore(session, model_path)
  14.  

  15. 8. File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/training/saver.py", line 1752, in restore
  16.  

  17. 9. {self.saver_def.filename_tensor_name: save_path})
  18.  

    1.  

    2. File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 900, in run
  19.  

    1.  

    2. run_metadata_ptr)
  20.  

    1.  

    2. File "/home/chop/.local/lib/python2.7/site-packages/tensorflow/python/client/session.py", line 1060, in _run
  21.  

    1.  

    2. raise RuntimeError('The Session graph is empty. Add operations to the '
  22.  

    1.  

    2. RuntimeError: The Session graph is empty. Add operations to the graph before calling run().
  23.  

0 Kudos
idata
Employee
713 Views

i just cant post the output what is going on? moderators please check this!

0 Kudos
idata
Employee
713 Views

So what am i missing? do i need to move to OpenVino? in order for this to work?

 

Do i need to train my model with tf_slim as mandatory step for NCSv1?

 

What am i missing? i have been using pretrained models with the NCSv1 and it work great for my security cameras, now i want to automate my house but i need a custom model but i just cant make it work with NCS. using a desktop is just to much resources for a smarthouse and alot of power and money as i might need the Nvidia card. So please allow me to keep playing with this device. love it.
0 Kudos
idata
Employee
713 Views

If you came for answers, stop using the NCSDK and switch to OpenVINO.

 

After that i was able to use the mo_tf.py and test it on one of the samples with my NCSv1 using the web documentation, is way better than NCS docs and very well done same as the OpenVINO SDK.
0 Kudos
Reply