Issue 1:
Hi ,

I follow steps in : https://github.com/tensorflow/tensorflow/tree/master/tensorflow/contrib/lite to build tensoflowlite from sources.

trying run output demo apk on Google Pixel 2 create crash :

03-07 06:09:44.739 22823-22837/? I/Adreno: ESXAPILOG: API logging initialized: Name = com.example.android.tflitecamerademo, PID = 22823
03-07 06:09:44.744 22823-22823/? W/linker: /data/app/com.example.android.tflitecamerademo-qSwQ-3Ztm2MtPAw8Lu3x4A==/lib/arm64/libtensorflowlite_jni.so: is missing DT_SONAME will use basename as a replacement: "libtensorflowlite_jni.so"
03-07 06:09:44.744 22823-22823/? W/System.err: TensorFlowLite: failed to load native library: dlopen failed: cannot locate symbol "_ZN6tflite14getCurrentTimeEv" referenced by "/data/app/com.example.android.tflitecamerademo-qSwQ-3Ztm2MtPAw8Lu3x4A==/lib/arm64/libtensorflowlite_jni.so"...
03-07 06:09:44.745 22823-22823/? W/linker: /data/app/com.example.android.tflitecamerademo-qSwQ-3Ztm2MtPAw8Lu3x4A==/lib/arm64/libtensorflowlite_jni.so: is missing DT_SONAME will use basename as a replacement: "libtensorflowlite_jni.so"
03-07 06:09:44.745 22823-22823/? W/System.err: TensorFlowLite: failed to load native library: dlopen failed: cannot locate symbol "_ZN6tflite14getCurrentTimeEv" referenced by "/data/app/com.example.android.tflitecamerademo-qSwQ-3Ztm2MtPAw8Lu3x4A==/lib/arm64/libtensorflowlite_jni.so"...
03-07 06:09:44.745 22823-22823/? E/zygote64: No implementation found for long org.tensorflow.lite.NativeInterpreterWrapper.createErrorReporter(int) (tried Java_org_tensorflow_lite_NativeInterpreterWrapper_createErrorReporter and Java_org_tensorflow_lite_NativeInterpreterWrapper_createErrorReporter__I)
03-07 06:09:44.745 22823-22823/? D/AndroidRuntime: Shutting down VM
03-07 06:09:44.746 22823-22823/? E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.example.android.tflitecamerademo, PID: 22823
java.lang.UnsatisfiedLinkError: No implementation found for long org.tensorflow.lite.NativeInterpreterWrapper.createErrorReporter(int) (tried Java_org_tensorflow_lite_NativeInterpreterWrapper_createErrorReporter and Java_org_tensorflow_lite_NativeInterpreterWrapper_createErrorReporter__I)
at org.tensorflow.lite.NativeInterpreterWrapper.createErrorReporter(Native Method)
at org.tensorflow.lite.NativeInterpreterWrapper.<init>(NativeInterpreterWrapper.java:48)
at org.tensorflow.lite.Interpreter.<init>(Interpreter.java:77)
at com.example.android.tflitecamerademo.ImageClassifier.<init>(ImageClassifier.java:87)
at com.example.android.tflitecamerademo.ImageClassifierFloatIntel.<init>(ImageClassifierFloatIntel.java:50)
at com.example.android.tflitecamerademo.CameraActivity.testImage(CameraActivity.java:71)
at com.example.android.tflitecamerademo.CameraActivity.onCreate(CameraActivity.java:36)
at android.app.Activity.performCreate(Activity.java:6999)
at android.app.Activity.performCreate(Activity.java:6990)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2731)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2856)
at android.app.ActivityThread.-wrap11(Unknown Source:0)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1589)
at android.os.Handler.dispatchMessage(Handler.java:106)
at android.os.Looper.loop(Looper.java:164)
at android.app.ActivityThread.main(ActivityThread.java:6494)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)

Build command : bazel build --cxxopt=--std=c++11 //tensorflow/contrib/lite/java/demo/app/src/main:TfLiteCameraDemo --config=android_arm64 --cpu=arm64-v8a --fat_apk_cpu=arm64-v8a

Tensorflow WORKSPACE file changes:

# Uncomment and update the paths in these entries to build the Android demo.
android_sdk_repository(
name = "androidsdk",
api_level = 27,
# Ensure that you have the build_tools_version below installed in the
# SDK manager as it updates periodically.
build_tools_version = "27.0.3",
# Replace with path to Android SDK on your system
path = "/home/XXX/Android/Sdk/",
)

android_ndk_repository(
name="androidndk",
path="/home/dnozik/Code/Tensorflow/android-ndk-r14b/",
# This needs to be 14 or higher to compile TensorFlow.
# # Please specify API level to >= 21 to build for 64-bit
# # archtectures or the Android NDK will automatically select biggest
# # API level that it supports without notice.
# # Note that the NDK version is not the API level.
api_level=27)

Symbols:

XXX@XXX-VirtualBox:~/Code$ nm -S libtensorflowlite_jni.so

nm: libtensorflowlite_jni.so: no symbols

Thanks for help.

Issue 2:
It would be nice to be able to append or remove samples to or from an existing set of samples saved in a tfrecords file. Otherwise the file has to be duplicated, which is unpractical for datasets >> 1TB.

Formulated in a more generalized way, this can also be seen as splitting and concatenating tfrecord files.