<p dir="auto">Hi, I am doing an android demo for RNN. I built a two-layer GRU network for inference. I used the API tf.nn.dynamic_rnn. However, when using this API, the saved generated .pb file contains an op called "All". And after I moved my .pb file to assets directory and run my android app demo, it said the op "All" is not registered. I know I can register an op in /core/kernels/BUILD file. However, I didn't find such an op in BUILD file. What is it and how can I fix the problem?<br>
Thank you very much!</p>
<p dir="auto">Here is the .pb file:<br>
node {<br>
name: "Test/Model/RNN/RNN/All"<br>
op: "All"<br>
input: "Test/Model/RNN/RNN/Equal"<br>
input: "Test/Model/RNN/RNN/Const"<br>
attr {<br>
key: "Tidx"<br>
value {<br>
type: DT_INT32<br>
}<br>
}<br>
attr {<br>
key: "keep_dims"<br>
value {<br>
b: false<br>
}<br>
}<br>
}</p>
<p dir="auto">Hello folks.</p>
<p dir="auto">Everytime I try to run the example fo TOCO:</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import tensorflow as tf

img = tf.placeholder(name=&quot;img&quot;, dtype=tf.float32, shape=(1, 64, 64, 3))
val = img + tf.constant([1., 2., 3.]) + tf.constant([1., 4., 4.])
out = tf.identity(val, name=&quot;out&quot;)
with tf.Session() as sess:
  tflite_model = tf.contrib.lite.toco_convert(sess.graph_def, [img], [out])
  open(&quot;test.tflite&quot;, &quot;wb&quot;).write(tflite_modeL)"><pre class="notranslate"><code class="notranslate">import tensorflow as tf

img = tf.placeholder(name="img", dtype=tf.float32, shape=(1, 64, 64, 3))
val = img + tf.constant([1., 2., 3.]) + tf.constant([1., 4., 4.])
out = tf.identity(val, name="out")
with tf.Session() as sess:
  tflite_model = tf.contrib.lite.toco_convert(sess.graph_def, [img], [out])
  open("test.tflite", "wb").write(tflite_modeL)
</code></pre></div>
<p dir="auto">I get the error: <strong>module 'tensorflow.contrib' has no attribute 'lite'</strong></p>
<p dir="auto">OS Platform and Distribution: Mac OS High Sierra<br>
Tensorflow installed from pip version 1.4.1.<br>
Python version: 2.7.14 and 3.6.3 :: Anaconda custom (64-bit)</p>
<p dir="auto">The informations about my system are those:</p>
<p dir="auto">== cat /etc/issue ===============================================<br>
Darwin Leandros-MacBook-Pro.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64<br>
Mac OS X 10.13.2</p>
<p dir="auto">== are we in docker =============================================<br>
No</p>
<p dir="auto">== compiler =====================================================<br>
Apple LLVM version 9.0.0 (clang-900.0.37)<br>
Target: x86_64-apple-darwin17.3.0<br>
Thread model: posix<br>
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin</p>
<p dir="auto">== uname -a =====================================================<br>
Darwin Leandros-MacBook-Pro.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov  9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64</p>
<p dir="auto">== check pips ===================================================<br>
numpy (1.13.3)<br>
numpydoc (0.7.0)<br>
protobuf (3.5.0.post1)<br>
tensorflow (1.3.0)<br>
tensorflow-tensorboard (0.1.8)</p>
<p dir="auto">== check for virtualenv =========================================<br>
False</p>
<p dir="auto">== tensorflow import ============================================<br>
tf.VERSION = 1.3.0<br>
tf.GIT_VERSION = v1.3.0-rc2-20-g0787eee<br>
tf.COMPILER_VERSION = v1.3.0-rc2-20-g0787eee<br>
Sanity check: array([1], dtype=int32)</p>
<p dir="auto">== env ==========================================================<br>
LD_LIBRARY_PATH is unset<br>
DYLD_LIBRARY_PATH is unset</p>
<p dir="auto">== nvidia-smi ===================================================<br>
./tf_env_collect.sh: line 105: nvidia-smi: command not found</p>
<p dir="auto">Seams like tensorflow lite is not available for reason =/</p>
<p dir="auto">Sorry if this is not a bug and I am just being dumb about how to make TOCO works.</p>