<p dir="auto"><em>Please make sure that this is a build/installation issue. As per our <a href="https://github.com/tensorflow/tensorflow/blob/master/ISSUES.md">GitHub Policy</a>, we only address code/doc bugs, performance issues, feature requests and build/installation issues on GitHub. tag:build_template</em></p>
<p dir="auto"><strong>System information</strong></p>
<ul dir="auto">
<li>OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10</li>
<li>Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on a mobile device: Samsung S5</li>
<li>TensorFlow installed from (source or binary): Binary</li>
<li>TensorFlow version: 1.12</li>
<li>Python version: 3.5</li>
<li>Installed using virtualenv? pip? conda?: conda</li>
<li>Bazel version (if compiling from source): N/A</li>
<li>GCC/Compiler version (if compiling from source):</li>
<li>CUDA/cuDNN version:</li>
<li>GPU model and memory:</li>
</ul>
<p dir="auto"><strong>Describe the problem</strong><br>
I have created my own architecture, on tensorflow and I have used Toco to convert to .tflite, However the android app still throws the following error: "java.lang.IllegalArgumentException: ByteBuffer is not a valid flatbuffer model."</p>
<p dir="auto"><strong>Provide the exact sequence of commands / steps that you executed before running into the problem</strong><br>
'''<br>
AssetFileDescriptor fileDescriptor = activity.getAssets().openFd(MODEL_PATH);<br>
FileInputStream inputStream = new FileInputStream(fileDescriptor.getFileDescriptor());<br>
FileChannel fileChannel = inputStream.getChannel();<br>
long startOffset = fileDescriptor.getStartOffset();<br>
long declaredLength = fileDescriptor.getDeclaredLength();<br>
return fileChannel.map(FileChannel.MapMode.READ_ONLY, startOffset, declaredLength);<br>
'''</p>
<p dir="auto"><strong>Any other info / logs</strong><br>
Include any logs or source code that would be helpful to diagnose the problem. If including tracebacks, please include the full traceback. Large logs and files should be attached.</p>
<p dir="auto">There are right now several high level APIs in TensorFlow (<code class="notranslate">tf.keras</code>, <code class="notranslate">tf.estimators</code>, <code class="notranslate">tf.layers</code>, <code class="notranslate">tf.contrib.learn</code>) that seem to be sometimes complementary and sometimes redundant. It is somewhat hard for me (and other parts of the internet I have searched) to understand which API to use for which purpose and how they relate to each other.</p>
<p dir="auto">For me it would greatly help if it could be specified:</p>
<ul dir="auto">
<li>What is the intended high level API for the future? Even so if none of them will be discontinued, it would be nice one could just get pointed to one preferred. All I could find the documentation right now is:<br>
"The higher level APIs are built on top of TensorFlow Core. These higher level APIs are typically easier to learn and use than TensorFlow Core. In addition, the higher level APIs make repetitive tasks easier and more consistent between different users. A high-level API like tf.estimator helps you manage data sets, estimators, training and inference."</li>
<li>How different modules from <code class="notranslate">contrib</code> relate to those in core tensorflow. E. g. it seems that <code class="notranslate">tf.estimators</code> is a portion of <code class="notranslate">tf.contrib.learn</code> that made it into core.</li>
<li>Why there are duplicate implementations like <code class="notranslate">tf.layers.contrib.conv2d</code> and <code class="notranslate">tf.layers.conv2d</code>?</li>
<li>If modules have complementary or duplicate functionality. E.g. <code class="notranslate">tf.layers</code> can be used with <code class="notranslate">tf.estimators</code> to define the model, but probably one does not want to mix <code class="notranslate">tf.layers</code> and <code class="notranslate">tf.keras</code> .</li>
</ul>
<p dir="auto">It would be great if that could be specified in the Overview section of the respective documentations, instead of just saying it is a high level API</p>