Remove layer from keras.__init__.py
PiperOrigin-RevId: 277133404 Change-Id: Iff8cc6a605c0ac57d944ea91a2c1dd71d56385af
This commit is contained in:
parent
e2a6fbbe3b
commit
213379298d
@ -23,10 +23,12 @@ from __future__ import print_function
|
||||
|
||||
from tensorflow.python import tf2
|
||||
|
||||
from tensorflow.python.keras import layers
|
||||
from tensorflow.python.keras.layers import Input
|
||||
from tensorflow.python.keras.models import Model
|
||||
from tensorflow.python.keras.models import Sequential
|
||||
# See b/110718070#comment18 for more details about this import.
|
||||
from tensorflow.python.keras import models
|
||||
|
||||
from tensorflow.python.keras.engine.input_layer import Input
|
||||
from tensorflow.python.keras.engine.sequential import Sequential
|
||||
from tensorflow.python.keras.engine.training import Model
|
||||
|
||||
from tensorflow.python.util.tf_export import keras_export
|
||||
|
||||
|
@ -27,6 +27,7 @@ keras_packages = [
|
||||
"tensorflow.python.keras.applications.vgg19",
|
||||
"tensorflow.python.keras.applications.xception",
|
||||
"tensorflow.python.keras.backend",
|
||||
"tensorflow.python.keras.backend_config",
|
||||
"tensorflow.python.keras.callbacks",
|
||||
"tensorflow.python.keras.callbacks_v1",
|
||||
"tensorflow.python.keras.constraints",
|
||||
@ -37,12 +38,46 @@ keras_packages = [
|
||||
"tensorflow.python.keras.datasets.imdb",
|
||||
"tensorflow.python.keras.datasets.mnist",
|
||||
"tensorflow.python.keras.datasets.reuters",
|
||||
"tensorflow.python.keras.engine.base_layer",
|
||||
"tensorflow.python.keras.engine.input_layer",
|
||||
"tensorflow.python.keras.engine.input_spec",
|
||||
"tensorflow.python.keras.engine.sequential",
|
||||
"tensorflow.python.keras.engine.training",
|
||||
"tensorflow.python.keras.estimator",
|
||||
"tensorflow.python.keras.initializers",
|
||||
"tensorflow.python.keras.layers.advanced_activations",
|
||||
"tensorflow.python.keras.layers.convolutional",
|
||||
"tensorflow.python.keras.layers.convolutional_recurrent",
|
||||
"tensorflow.python.keras.layers.core",
|
||||
"tensorflow.python.keras.layers.cudnn_recurrent",
|
||||
"tensorflow.python.keras.layers.dense_attention",
|
||||
"tensorflow.python.keras.layers.embeddings",
|
||||
"tensorflow.python.keras.layers.local",
|
||||
"tensorflow.python.keras.layers.merge",
|
||||
"tensorflow.python.keras.layers.noise",
|
||||
"tensorflow.python.keras.layers.normalization",
|
||||
"tensorflow.python.keras.layers.normalization_v2",
|
||||
"tensorflow.python.keras.layers.pooling",
|
||||
"tensorflow.python.keras.layers.recurrent",
|
||||
"tensorflow.python.keras.layers.recurrent_v2",
|
||||
"tensorflow.python.keras.layers.serialization",
|
||||
"tensorflow.python.keras.layers.wrappers",
|
||||
"tensorflow.python.keras.losses",
|
||||
"tensorflow.python.keras.metrics",
|
||||
"tensorflow.python.keras.mixed_precision.experimental.loss_scale_optimizer",
|
||||
"tensorflow.python.keras.mixed_precision.experimental.policy",
|
||||
"tensorflow.python.keras.models",
|
||||
"tensorflow.python.keras.ops",
|
||||
"tensorflow.python.keras.optimizer_v2.adadelta",
|
||||
"tensorflow.python.keras.optimizer_v2.adagrad",
|
||||
"tensorflow.python.keras.optimizer_v2.adam",
|
||||
"tensorflow.python.keras.optimizer_v2.adamax",
|
||||
"tensorflow.python.keras.optimizer_v2.ftrl",
|
||||
"tensorflow.python.keras.optimizer_v2.gradient_descent",
|
||||
"tensorflow.python.keras.optimizer_v2.learning_rate_schedule",
|
||||
"tensorflow.python.keras.optimizer_v2.nadam",
|
||||
"tensorflow.python.keras.optimizer_v2.optimizer_v2",
|
||||
"tensorflow.python.keras.optimizer_v2.rmsprop",
|
||||
"tensorflow.python.keras.optimizers",
|
||||
"tensorflow.python.keras.premade.linear",
|
||||
"tensorflow.python.keras.premade.wide_deep",
|
||||
@ -57,6 +92,7 @@ keras_packages = [
|
||||
"tensorflow.python.keras.utils.generic_utils",
|
||||
"tensorflow.python.keras.utils.io_utils",
|
||||
"tensorflow.python.keras.utils.layer_utils",
|
||||
"tensorflow.python.keras.utils.losses_utils",
|
||||
"tensorflow.python.keras.utils.multi_gpu_utils",
|
||||
"tensorflow.python.keras.utils.np_utils",
|
||||
"tensorflow.python.keras.utils.vis_utils",
|
||||
|
@ -1,31 +0,0 @@
|
||||
# Copyright 2015 The TensorFlow Authors. All Rights Reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# http://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
# ==============================================================================
|
||||
"""The Keras Engine: graph topology and training loop functionality.
|
||||
"""
|
||||
from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
# TODO(fchollet): Remove hourglass imports once external code is done importing
|
||||
# non-public APIs.
|
||||
from tensorflow.python.keras.engine.base_layer import Layer
|
||||
from tensorflow.python.keras.engine.input_layer import Input
|
||||
from tensorflow.python.keras.engine.input_layer import InputLayer
|
||||
from tensorflow.python.keras.engine.input_spec import InputSpec
|
||||
from tensorflow.python.keras.utils.layer_utils import get_source_inputs
|
||||
|
||||
del absolute_import
|
||||
del division
|
||||
del print_function
|
@ -32,6 +32,7 @@ from tensorflow.python.keras.engine import base_layer
|
||||
from tensorflow.python.keras.engine import input_layer as input_layer_lib
|
||||
from tensorflow.python.keras.engine import network as network_lib
|
||||
from tensorflow.python.keras.engine import training
|
||||
from tensorflow.python.keras.utils import layer_utils
|
||||
from tensorflow.python.ops import array_ops
|
||||
from tensorflow.python.ops import math_ops
|
||||
from tensorflow.python.ops import state_ops
|
||||
@ -479,7 +480,7 @@ class NetworkConstructionTest(keras_parameterized.TestCase):
|
||||
self.assertListEqual([x.shape for x in fn_outputs], [(10, 64), (10, 5)])
|
||||
|
||||
# test get_source_inputs
|
||||
self._assertAllIs(keras.engine.get_source_inputs(c), [a, b])
|
||||
self._assertAllIs(layer_utils.get_source_inputs(c), [a, b])
|
||||
|
||||
# serialization / deserialization
|
||||
json_config = model.to_json()
|
||||
|
Loading…
Reference in New Issue
Block a user