Issue 1:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): none

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): windows 10

TensorFlow installed from (source or binary): pip

TensorFlow version (use command below): 1.9

Python version: 3.5.1-32 bit

Bazel version (if compiling from source): 0.15.0

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version: nothing since i have AMD radeon

GPU model and memory:

Exact command to reproduce:

tflite_convert \
--output_file=/saved_model/maonani.tflite \
--saved_model_dir=/saved_model/saved_model

Describe the problem

when i enter the command on cmd i get a response saying:

'tflite_convert' is not recognized as an internal or external command,

operable program or batch file.

i dont know why im getting this since i already have cloned the git repository of tensorflow

Source code / logs

C:\Users\LENOVO-PC\tensorflow> tflite_convert \ --output_file=/saved_model/maonani.tflite \ --saved_model_dir=/saved_model/saved_model

'tflite_convert' is not recognized as an internal or external command,

operable program or batch file.

Issue 2:
System information

Have I written custom code (as opposed to using a stock example script provided in TensorFlow): No

OS Platform and Distribution (e.g., Linux Ubuntu 16.04): Windows 10

Mobile device (e.g. iPhone 8, Pixel 2, Samsung Galaxy) if the issue happens on mobile device: n/a

TensorFlow installed from (source or binary): source, pip install --upgrade tf-nightly

TensorFlow version (use command below): GIT: 'v1.9.0-rc2-798-gc818bf016d', VERSION: '1.10.0-dev20180719'

Python version: 3.6.6

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version:

GPU model and memory:

Exact command to reproduce:

Python API

`import tensorflow as tf

converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5")

tflite_model = converter.convert()

open("model.tflite", "wb").write(tflite_model)`

and

Command-line

toco

You can collect some of this information using our environment capture script:

https://github.com/tensorflow/tensorflow/tree/master/tools/tf_env_collect.sh

You can obtain the TensorFlow version with

python -c "import tensorflow as tf; print(tf.GIT_VERSION, tf.VERSION)"

Describe the problem

I'm trying to convert a keras model to the tflite format, but the sample code provided on the website doesn't seem to work. As advised in my other issue, I installed tf-nightly. I used a venv to get a clean environment but for some reason, other issues have arisen. In the case of the Python API, 'lite' seems to be missing from 'tensorflow.contrib' whereas when I run 'toco' from the command line, it raises a ModuleNotFoundError as shown below. Any help would be greatly appreciated.

Source code / logs

Python API

Traceback (most recent call last): File "sandbox/run.py", line 3, in <module> converter = tf.contrib.lite.TocoConverter.from_keras_model_file("model.h5") File "C:\beta\lib\site-packages\tensorflow\python\util\lazy_loader.py", line 54, in __getattr__ return getattr(module, item) AttributeError: module 'tensorflow.contrib' has no attribute 'lite'

Command-line (running toco)

Traceback (most recent call last): File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 193, in _run_module_as_main "__main__", mod_spec) File "c:\users\user\appdata\local\programs\python\python36\Lib\runpy.py", line 85, in _run_code exec(code, run_globals) File "C:\beta\Scripts\toco.exe\__main__.py", line 5, in <module> ModuleNotFoundError: No module named 'tensorflow.contrib.lite.python.tflite_convert'