Issue 1:
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 Build 16299.192 and Windows 7

TensorFlow installed from (source or binary): binary

TensorFlow version (use command below): 1.5.0rc1 and tf-nightly 1.6.0.dev20180124

Python version: 3.6.2 and 3.5.2

Bazel version (if compiling from source):

GCC/Compiler version (if compiling from source):

CUDA/cuDNN version: 8.0

GPU model and memory: Nvidia GT 740M 2GB

Exact command to reproduce: toco --help

Describe the problem

I am trying to run the codelab tutorial of tensorflow lite. After installing tf-nightly, when I try to run the command "toco --help", I get the error ModuleNotFoundError: No module named 'tensorflow.contrib.lite.toco.python'.

I have tried this on 3 computers( all Windows) and the same problem persists.

Source code / logs

C:\Users\HP\Downloads>toco --help

Traceback (most recent call last):

File "c:\programdata\anaconda3\lib\runpy.py", line 193, in _run_module_as_main

"main", mod_spec)

File "c:\programdata\anaconda3\lib\runpy.py", line 85, in run_code

exec(code, run_globals)

File "C:\ProgramData\Anaconda3\Scripts\toco.exe_main.py", line 5, in

ModuleNotFoundError: No module named 'tensorflow.contrib.lite.toco.python'

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'