Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

readNetFromTensorflow when loading customized model

Hi

OpenCV 3.4.1 Python 3.6 Tensorflow 1.5.0

I just construct a simple model for mnist.

x = tf.placeholder(tf.float32, [None, 784], name='input')
W = tf.Variable(tf.zeros([784,10]), dtype=tf.float32, name='W')
b = tf.Variable(tf.zeros([10]), dtype=tf.float32, name='b')
y = tf.nn.softmax(tf.matmul(x,W) + b, name='softmax')

And, save graph.pbtxt mode and trained weight ckpt data as attached file.

Then, freeze graph and weight to frozen.pb file.

Next, optimize frozen.pb file to frozen_inference_graph.pb

readNetFromTensorflow always fail no matter how I try. cv::Exception at memory location

Any advise or guidance would be greatly appreciated!

Thanks Hank

readNetFromTensorflow when loading customized model

Hi

OpenCV 3.4.1 Python 3.6 Tensorflow 1.5.0

I just construct a simple model for mnist.

x = tf.placeholder(tf.float32, [None, 784], name='input')
W = tf.Variable(tf.zeros([784,10]), dtype=tf.float32, name='W')
b = tf.Variable(tf.zeros([10]), dtype=tf.float32, name='b')
y = tf.nn.softmax(tf.matmul(x,W) + b, name='softmax')

And, save graph.pbtxt mode and trained weight ckpt data as attached file.

Then, freeze graph and weight to frozen.pb file.

Next, optimize frozen.pb file to frozen_inference_graph.pb

readNetFromTensorflow always fail no matter how I try. cv::Exception at memory location

Any advise or guidance would be greatly appreciated!

Thanks HankHank C:\fakepath\graph.pbtxt.jpg C:\fakepath\frozen_inference_graph.pb.jpg

readNetFromTensorflow when loading customized model

Hi

OpenCV 3.4.1 Python 3.6 Tensorflow 1.5.0

I just construct a simple model for mnist.

x = tf.placeholder(tf.float32, [None, 784], name='input')
W = tf.Variable(tf.zeros([784,10]), dtype=tf.float32, name='W')
b = tf.Variable(tf.zeros([10]), dtype=tf.float32, name='b')
y = tf.nn.softmax(tf.matmul(x,W) + b, name='softmax')

And, save graph.pbtxt mode and trained weight ckpt data as attached file.

Then, freeze graph and weight to frozen.pb file.

Next, optimize frozen.pb file to frozen_inference_graph.pb

readNetFromTensorflow always fail no matter how I try. cv::Exception at memory location

Any advise or guidance would be greatly appreciated!

Thanks Hank C:\fakepath\graph.pbtxt.jpg C:\fakepath\frozen_inference_graph.pb.jpgHank

readNetFromTensorflow when loading customized model

Hi

OpenCV 3.4.1 Python 3.6 Tensorflow 1.5.0

I just construct a simple model for mnist.

x = tf.placeholder(tf.float32, [None, 784], name='input')
W = tf.Variable(tf.zeros([784,10]), dtype=tf.float32, name='W')
b = tf.Variable(tf.zeros([10]), dtype=tf.float32, name='b')
y = tf.nn.softmax(tf.matmul(x,W) + b, name='softmax')

And, save graph.pbtxt mode and trained weight ckpt data as attached file.data.

Then, freeze graph and weight to frozen.pb file.

Next, optimize frozen.pb file to frozen_inference_graph.pb

Model txt and binary files in below link. https://drive.google.com/file/d/1v6foUlXan7pJH6Woz-wMhHX9T1L-_7ZN/view?usp=sharing https://drive.google.com/file/d/1bA7-6ADwTCpZ1UNTDCViWhoV9CYFj0lS/view?usp=sharing https://drive.google.com/file/d/1HC4mw0BFH5FQV5KQvJN1B0HkIcZakfbF/view?usp=sharing

readNetFromTensorflow always fail no matter how I try. cv::Exception at memory location

Any advise or guidance would be greatly appreciated!

Thanks Hank