Issue 1:
System information

OS Platform and Distribution Ubuntu 18.04 LTS

TensorFlow installed from source or binary): source

TensorFlow version (use command below): v2.0.0-alpha0-4-g2c2d508 2.0.0-alpha0

Python version: 3.5.7

Bazel version (if compiling from source): From docker image

GCC/Compiler version (if compiling from source): From docker image

CUDA/cuDNN version: NA

GPU model and memory: NA

Describe the current behavior

This documentation suggests there are 4 ways to load an optimizer:

https://www.tensorflow.org/versions/r2.0/api_docs/python/tf/optimizers

However:

(tf_35) mark@science:~$ python tf_optimizers.py

Traceback (most recent call last):

File "tf_optimizers.py", line 7, in

opt4 = tf.optimizers.Adagrad

AttributeError: module 'tensorflow' has no attribute 'optimizers'

Describe the expected behavior

opt = tf.optimizers.Adagrad doesn't work. The first 3 methods do.

MINIMAL code to reproduce the issue

import tensorflow as tf

tf.version

opt1 = tf.compat.v2.keras.optimizers.Adagrad

opt2 = tf.compat.v2.optimizers.Adagrad

opt3 = tf.keras.optimizers.Adagrad

opt4 = tf.optimizers.Adagrad

I don't know if this is a documentation issue or a tensorflow bug.

Issue 2:
when I try to converto to tflite, occur below errors

$ tflite_convert --output_file=./model1/test.tflite --keras_model_file=./model1/186-0.0481.hdf5

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/init_ops.py:96: calling init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.

Instructions for updating:

Call initializer instance with the dtype argument instead of passing it to the constructor

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/init_ops.py:1253: calling init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.

Instructions for updating:

Call initializer instance with the dtype argument instead of passing it to the constructor

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/ops/init_ops.py:96: calling init (from tensorflow.python.ops.init_ops) with dtype is deprecated and will be removed in a future version.

Instructions for updating:

Call initializer instance with the dtype argument instead of passing it to the constructor

2019-02-12 18:00:17.730635: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: SSE4.1 SSE4.2

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/lite.py:636: convert_variables_to_constants (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.

Instructions for updating:

Use tf.compat.v1.graph_util.convert_variables_to_constants

WARNING:tensorflow:From /usr/local/lib/python2.7/dist-packages/tensorflow/python/framework/graph_util_impl.py:245: extract_sub_graph (from tensorflow.python.framework.graph_util_impl) is deprecated and will be removed in a future version.

Instructions for updating:

Use tf.compat.v1.graph_util.extract_sub_graph

2019-02-12 18:00:18.207014: I tensorflow/core/grappler/devices.cc:53] Number of eligible GPUs (core count >= 8): 0 (Note: TensorFlow was not compiled with CUDA support)

2019-02-12 18:00:18.207141: I tensorflow/core/grappler/clusters/single_machine.cc:359] Starting new session

2019-02-12 18:00:18.210189: E tensorflow/core/grappler/grappler_item_builder.cc:636] Init node dense/kernel/Assign doesn't exist in graph

Traceback (most recent call last):

File "/usr/local/bin/tflite_convert", line 10, in

sys.exit(main())

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/tflite_convert.py", line 442, in main

app.run(main=run_main, argv=sys.argv[:1])

File "/usr/local/lib/python2.7/dist-packages/tensorflow/python/platform/app.py", line 125, in run

_sys.exit(main(argv))

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/tflite_convert.py", line 438, in run_main

_convert_model(tflite_flags)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/tflite_convert.py", line 191, in _convert_model

output_data = converter.convert()

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/lite.py", line 500, in convert

**converter_kwargs)

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/convert.py", line 442, in toco_convert_impl

input_data.SerializeToString())

File "/usr/local/lib/python2.7/dist-packages/tensorflow/lite/python/convert.py", line 205, in toco_convert_protos

"TOCO failed. See console for info.\n%s\n%s\n" % (stdout, stderr))

tensorflow.lite.python.convert.ConverterError: TOCO failed. See console for info.

2019-02-12 18:00:19.028566: F tensorflow/core/framework/function.cc:1640] Check failed: GetOpGradFactory()->insert({op, func}).second Duplicated gradient for MapAccumulate

Aborted (core dumped)

How can I fixed it?

somebody has any idea?