from __future__ import absolute_import
from . import np_utils
from . import generic_utils
from . import data_utils
from . import io_utils
from . import conv_utils

# Globally-importable utils.
from .io_utils import HDF5Matrix
from .io_utils import H5Dict
from .data_utils import get_file
from .data_utils import Sequence
from .data_utils import GeneratorEnqueuer
from .data_utils import OrderedEnqueuer
from .generic_utils import CustomObjectScope
from .generic_utils import custom_object_scope
from .generic_utils import get_custom_objects
from .generic_utils import serialize_keras_object
from .generic_utils import deserialize_keras_object
from .generic_utils import Progbar
from .layer_utils import convert_all_kernels_in_model
from .layer_utils import get_source_inputs
from .layer_utils import print_summary
from .vis_utils import plot_model
from .np_utils import to_categorical
from .np_utils import normalize
from .multi_gpu_utils import multi_gpu_model

keras/utils/__init__.py
from __future__ import absolute_import
from . import np_utils
from . import generic_utils
from . import data_utils
from . import io_utils
from . import conv_utils

# Globally-importable utils.
from .io_utils import HDF5Matrix
from .io_utils import H5Dict
from .data_utils import get_file
from .data_utils import Sequence
from .data_utils import GeneratorEnqueuer
from .data_utils import OrderedEnqueuer
from .generic_utils import CustomObjectScope
from .generic_utils import custom_object_scope
from .generic_utils import get_custom_objects
from .generic_utils import serialize_keras_object
from .generic_utils import deserialize_keras_object
from .generic_utils import Progbar
from .layer_utils import convert_all_kernels_in_model
from .layer_utils import get_source_inputs
from .layer_utils import print_summary
from .vis_utils import model_to_dot
from .vis_utils import plot_model
from .np_utils import to_categorical
from .np_utils import normalize
from .multi_gpu_utils import multi_gpu_model

keras/utils/__init__.py
diff --git a/docs/templates/getting-started/faq.md b/docs/templates/getting-started/faq.md
index 0973d9e0f64f..53deec03f5e7 100644
--- a/docs/templates/getting-started/faq.md
+++ b/docs/templates/getting-started/faq.md
@@ -513,7 +513,7 @@ The VGG16 model is also the basis for several Keras example scripts:
 
 ### How can I use HDF5 inputs with Keras?
 
-You can use the `HDF5Matrix` class from `keras.utils.io_utils`. See [the HDF5Matrix documentation](/utils/#hdf5matrix) for details.
+You can use the `HDF5Matrix` class from `keras.utils`. See [the HDF5Matrix documentation](/utils/#hdf5matrix) for details.
 
 You can also directly use a HDF5 dataset:
 
diff --git a/docs/templates/losses.md b/docs/templates/losses.md
index d2324b17044b..a27544588813 100644
--- a/docs/templates/losses.md
+++ b/docs/templates/losses.md
@@ -31,7 +31,7 @@ For a few examples of such functions, check out the [losses source](https://gith
 **Note**: when using the `categorical_crossentropy` loss, your targets should be in categorical format (e.g. if you have 10 classes, the target for each sample should be a 10-dimensional vector that is all-zeros except for a 1 at the index corresponding to the class of the sample). In order to convert *integer targets* into *categorical targets*, you can use the Keras utility `to_categorical`:
 
 ```python
-from keras.utils.np_utils import to_categorical
+from keras.utils import to_categorical
 
 categorical_labels = to_categorical(int_labels, num_classes=None)
 ```
diff --git a/docs/templates/visualization.md b/docs/templates/visualization.md
index cd265fdfc282..cd296c601765 100644
--- a/docs/templates/visualization.md
+++ b/docs/templates/visualization.md
@@ -1,8 +1,7 @@
 
 ## Model visualization
 
-The `keras.utils.vis_utils` module provides utility functions to plot
-a Keras model (using `graphviz`).
+Keras provides utility functions to plot a Keras model (using `graphviz`).
 
 This will plot a graph of the model and save it to a file:
 ```python
@@ -21,7 +20,7 @@ You can also directly obtain the `pydot.Graph` object and render it yourself,
 for example to show it in an ipython notebook :
 ```python
 from IPython.display import SVG
-from keras.utils.vis_utils import model_to_dot
+from keras.utils import model_to_dot
 
 SVG(model_to_dot(model).create(prog='dot', format='svg'))
 ```
diff --git a/keras/utils/__init__.py b/keras/utils/__init__.py
index 536135ed8e9b..ed02bfbf3d69 100644
--- a/keras/utils/__init__.py
+++ b/keras/utils/__init__.py
@@ -21,6 +21,7 @@
 from .layer_utils import convert_all_kernels_in_model
 from .layer_utils import get_source_inputs
 from .layer_utils import print_summary
+from .vis_utils import model_to_dot
 from .vis_utils import plot_model
 from .np_utils import to_categorical
 from .np_utils import normalize

Suggesting keras.utils.*_utils packages should not be part of the official API
In general, all `keras.utils.*_utils.*` functions and classes that are documented on keras.io are available directly in `keras.utils` and documented as such. However there are a few discrepancies:
* `keras.utils.vis_utils.model_to_dot` is not available in `keras.utils`.
* `keras.utils.np_utils.to_categorical` sometimes appears in the documentation, instead of `keras.utils.to_categorical`.
* `keras.utils.io_utils.HDF5Matrix` sometimes appears in the documentation, instead of `keras.utils.HDF5Matrix`.

This introduces some confusion as to what is part of the official Keras API or not: in particular, are `keras.utils.*_utils` packages part of the Keras API or not? Possibly as a result of this confusion, tf.keras is not consistent with keras-team/keras, as it has no `tf.keras.utils.*_utils` packages, and is missing `model_to_dot` altogether. Arguably this is a tf.keras issue, but the fact that only three utility functions are placed in `keras.utils.*_utils` packages is surprising IMHO.

I will propose a PR to fix this by:
* Adding `model_to_dot` to `keras.utils`
* Fixing the documentation to remove all references to `keras.utils.*_utils` packages.
