diff --git a/keras/api/__init__.py b/keras/api/__init__.py index 1750a42e869..334dc282386 100644 --- a/keras/api/__init__.py +++ b/keras/api/__init__.py @@ -4,7 +4,6 @@ since your modifications would be overwritten. """ -from keras.api import _tf_keras from keras.api import activations from keras.api import applications from keras.api import backend diff --git a/keras/api/_tf_keras/keras/__init__.py b/keras/api/_tf_keras/keras/__init__.py index 334dc282386..34744db7e71 100644 --- a/keras/api/_tf_keras/keras/__init__.py +++ b/keras/api/_tf_keras/keras/__init__.py @@ -6,7 +6,6 @@ from keras.api import activations from keras.api import applications -from keras.api import backend from keras.api import callbacks from keras.api import config from keras.api import constraints @@ -15,19 +14,15 @@ from keras.api import dtype_policies from keras.api import export from keras.api import initializers -from keras.api import layers from keras.api import legacy -from keras.api import losses from keras.api import metrics from keras.api import mixed_precision from keras.api import models from keras.api import ops from keras.api import optimizers -from keras.api import preprocessing from keras.api import quantizers from keras.api import random from keras.api import regularizers -from keras.api import saving from keras.api import tree from keras.api import utils from keras.src.backend.common.keras_tensor import KerasTensor @@ -37,6 +32,7 @@ from keras.src.backend.exports import name_scope from keras.src.dtype_policies.dtype_policy import DTypePolicy from keras.src.dtype_policies.dtype_policy import FloatDTypePolicy +from keras.src.dtype_policies.dtype_policy import QuantizedDTypePolicy from keras.src.initializers.initializer import Initializer from keras.src.layers.core.input_layer import Input from keras.src.layers.input_spec import InputSpec @@ -48,7 +44,20 @@ from keras.src.ops.function import Function from keras.src.ops.operation import Operation from keras.src.optimizers.optimizer import Optimizer +from keras.src.quantizers.quantizers import AbsMaxQuantizer from keras.src.quantizers.quantizers import Quantizer from keras.src.regularizers.regularizers import Regularizer -from keras.src.version import __version__ from keras.src.version import version + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras._tf_keras.keras import backend +from keras._tf_keras.keras import layers +from keras._tf_keras.keras import losses +from keras._tf_keras.keras import metrics +from keras._tf_keras.keras import preprocessing diff --git a/keras/api/_tf_keras/keras/backend/__init__.py b/keras/api/_tf_keras/keras/backend/__init__.py index 840bde6e4de..8b5ff7ecbfd 100644 --- a/keras/api/_tf_keras/keras/backend/__init__.py +++ b/keras/api/_tf_keras/keras/backend/__init__.py @@ -18,3 +18,134 @@ from keras.src.backend.config import set_floatx from keras.src.backend.config import set_image_data_format from keras.src.utils.naming import get_uid + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.legacy.backend import abs +from keras.src.legacy.backend import all +from keras.src.legacy.backend import any +from keras.src.legacy.backend import arange +from keras.src.legacy.backend import argmax +from keras.src.legacy.backend import argmin +from keras.src.legacy.backend import batch_dot +from keras.src.legacy.backend import batch_flatten +from keras.src.legacy.backend import batch_get_value +from keras.src.legacy.backend import batch_normalization +from keras.src.legacy.backend import batch_set_value +from keras.src.legacy.backend import bias_add +from keras.src.legacy.backend import binary_crossentropy +from keras.src.legacy.backend import binary_focal_crossentropy +from keras.src.legacy.backend import cast +from keras.src.legacy.backend import cast_to_floatx +from keras.src.legacy.backend import categorical_crossentropy +from keras.src.legacy.backend import categorical_focal_crossentropy +from keras.src.legacy.backend import clip +from keras.src.legacy.backend import concatenate +from keras.src.legacy.backend import constant +from keras.src.legacy.backend import conv1d +from keras.src.legacy.backend import conv2d +from keras.src.legacy.backend import conv2d_transpose +from keras.src.legacy.backend import conv3d +from keras.src.legacy.backend import cos +from keras.src.legacy.backend import count_params +from keras.src.legacy.backend import ctc_batch_cost +from keras.src.legacy.backend import ctc_decode +from keras.src.legacy.backend import ctc_label_dense_to_sparse +from keras.src.legacy.backend import cumprod +from keras.src.legacy.backend import cumsum +from keras.src.legacy.backend import depthwise_conv2d +from keras.src.legacy.backend import dot +from keras.src.legacy.backend import dropout +from keras.src.legacy.backend import dtype +from keras.src.legacy.backend import elu +from keras.src.legacy.backend import equal +from keras.src.legacy.backend import eval +from keras.src.legacy.backend import exp +from keras.src.legacy.backend import expand_dims +from keras.src.legacy.backend import eye +from keras.src.legacy.backend import flatten +from keras.src.legacy.backend import foldl +from keras.src.legacy.backend import foldr +from keras.src.legacy.backend import gather +from keras.src.legacy.backend import get_value +from keras.src.legacy.backend import gradients +from keras.src.legacy.backend import greater +from keras.src.legacy.backend import greater_equal +from keras.src.legacy.backend import hard_sigmoid +from keras.src.legacy.backend import in_top_k +from keras.src.legacy.backend import int_shape +from keras.src.legacy.backend import is_sparse +from keras.src.legacy.backend import l2_normalize +from keras.src.legacy.backend import less +from keras.src.legacy.backend import less_equal +from keras.src.legacy.backend import log +from keras.src.legacy.backend import map_fn +from keras.src.legacy.backend import max +from keras.src.legacy.backend import maximum +from keras.src.legacy.backend import mean +from keras.src.legacy.backend import min +from keras.src.legacy.backend import minimum +from keras.src.legacy.backend import moving_average_update +from keras.src.legacy.backend import name_scope +from keras.src.legacy.backend import ndim +from keras.src.legacy.backend import not_equal +from keras.src.legacy.backend import one_hot +from keras.src.legacy.backend import ones +from keras.src.legacy.backend import ones_like +from keras.src.legacy.backend import permute_dimensions +from keras.src.legacy.backend import pool2d +from keras.src.legacy.backend import pool3d +from keras.src.legacy.backend import pow +from keras.src.legacy.backend import prod +from keras.src.legacy.backend import random_bernoulli +from keras.src.legacy.backend import random_normal +from keras.src.legacy.backend import random_normal_variable +from keras.src.legacy.backend import random_uniform +from keras.src.legacy.backend import random_uniform_variable +from keras.src.legacy.backend import relu +from keras.src.legacy.backend import repeat +from keras.src.legacy.backend import repeat_elements +from keras.src.legacy.backend import reshape +from keras.src.legacy.backend import resize_images +from keras.src.legacy.backend import resize_volumes +from keras.src.legacy.backend import reverse +from keras.src.legacy.backend import rnn +from keras.src.legacy.backend import round +from keras.src.legacy.backend import separable_conv2d +from keras.src.legacy.backend import set_value +from keras.src.legacy.backend import shape +from keras.src.legacy.backend import sigmoid +from keras.src.legacy.backend import sign +from keras.src.legacy.backend import sin +from keras.src.legacy.backend import softmax +from keras.src.legacy.backend import softplus +from keras.src.legacy.backend import softsign +from keras.src.legacy.backend import sparse_categorical_crossentropy +from keras.src.legacy.backend import spatial_2d_padding +from keras.src.legacy.backend import spatial_3d_padding +from keras.src.legacy.backend import sqrt +from keras.src.legacy.backend import square +from keras.src.legacy.backend import squeeze +from keras.src.legacy.backend import stack +from keras.src.legacy.backend import std +from keras.src.legacy.backend import stop_gradient +from keras.src.legacy.backend import sum +from keras.src.legacy.backend import switch +from keras.src.legacy.backend import tanh +from keras.src.legacy.backend import temporal_padding +from keras.src.legacy.backend import tile +from keras.src.legacy.backend import to_dense +from keras.src.legacy.backend import transpose +from keras.src.legacy.backend import truncated_normal +from keras.src.legacy.backend import update +from keras.src.legacy.backend import update_add +from keras.src.legacy.backend import update_sub +from keras.src.legacy.backend import var +from keras.src.legacy.backend import variable +from keras.src.legacy.backend import zeros +from keras.src.legacy.backend import zeros_like diff --git a/keras/api/_tf_keras/keras/layers/__init__.py b/keras/api/_tf_keras/keras/layers/__init__.py index a4e1bf9a6bb..536269ce786 100644 --- a/keras/api/_tf_keras/keras/layers/__init__.py +++ b/keras/api/_tf_keras/keras/layers/__init__.py @@ -193,3 +193,15 @@ from keras.src.utils.jax_layer import FlaxLayer from keras.src.utils.jax_layer import JaxLayer from keras.src.utils.torch_utils import TorchModuleWrapper + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.legacy.layers import AlphaDropout +from keras.src.legacy.layers import RandomHeight +from keras.src.legacy.layers import RandomWidth +from keras.src.legacy.layers import ThresholdedReLU diff --git a/keras/api/_tf_keras/keras/losses/__init__.py b/keras/api/_tf_keras/keras/losses/__init__.py index ecaadddf6b7..9a134077e03 100644 --- a/keras/api/_tf_keras/keras/losses/__init__.py +++ b/keras/api/_tf_keras/keras/losses/__init__.py @@ -8,9 +8,9 @@ from keras.src.losses import get from keras.src.losses import serialize from keras.src.losses.loss import Loss -from keras.src.losses.losses import CTC from keras.src.losses.losses import BinaryCrossentropy from keras.src.losses.losses import BinaryFocalCrossentropy +from keras.src.losses.losses import CTC from keras.src.losses.losses import CategoricalCrossentropy from keras.src.losses.losses import CategoricalFocalCrossentropy from keras.src.losses.losses import CategoricalHinge @@ -48,3 +48,24 @@ from keras.src.losses.losses import sparse_categorical_crossentropy from keras.src.losses.losses import squared_hinge from keras.src.losses.losses import tversky + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.legacy.losses import Reduction +from keras.src.losses.losses import kl_divergence as KLD +from keras.src.losses.losses import kl_divergence as kld +from keras.src.losses.losses import kl_divergence as kullback_leibler_divergence +from keras.src.losses.losses import log_cosh as logcosh +from keras.src.losses.losses import mean_absolute_error as MAE +from keras.src.losses.losses import mean_absolute_error as mae +from keras.src.losses.losses import mean_absolute_percentage_error as MAPE +from keras.src.losses.losses import mean_absolute_percentage_error as mape +from keras.src.losses.losses import mean_squared_error as MSE +from keras.src.losses.losses import mean_squared_error as mse +from keras.src.losses.losses import mean_squared_logarithmic_error as MSLE +from keras.src.losses.losses import mean_squared_logarithmic_error as msle diff --git a/keras/api/_tf_keras/keras/metrics/__init__.py b/keras/api/_tf_keras/keras/metrics/__init__.py index dc59b32a46c..9ab8a93de30 100644 --- a/keras/api/_tf_keras/keras/metrics/__init__.py +++ b/keras/api/_tf_keras/keras/metrics/__init__.py @@ -74,3 +74,23 @@ from keras.src.metrics.regression_metrics import MeanSquaredLogarithmicError from keras.src.metrics.regression_metrics import R2Score from keras.src.metrics.regression_metrics import RootMeanSquaredError + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.losses.losses import kl_divergence as KLD +from keras.src.losses.losses import kl_divergence as kld +from keras.src.losses.losses import kl_divergence as kullback_leibler_divergence +from keras.src.losses.losses import log_cosh as logcosh +from keras.src.losses.losses import mean_absolute_error as MAE +from keras.src.losses.losses import mean_absolute_error as mae +from keras.src.losses.losses import mean_absolute_percentage_error as MAPE +from keras.src.losses.losses import mean_absolute_percentage_error as mape +from keras.src.losses.losses import mean_squared_error as MSE +from keras.src.losses.losses import mean_squared_error as mse +from keras.src.losses.losses import mean_squared_logarithmic_error as MSLE +from keras.src.losses.losses import mean_squared_logarithmic_error as msle diff --git a/keras/api/_tf_keras/keras/preprocessing/__init__.py b/keras/api/_tf_keras/keras/preprocessing/__init__.py index c9ed7fd664c..fda4779d090 100644 --- a/keras/api/_tf_keras/keras/preprocessing/__init__.py +++ b/keras/api/_tf_keras/keras/preprocessing/__init__.py @@ -4,10 +4,21 @@ since your modifications would be overwritten. """ -from keras.api.preprocessing import image -from keras.api.preprocessing import sequence +from keras._tf_keras.keras.preprocessing import image +from keras._tf_keras.keras.preprocessing import sequence from keras.src.utils.image_dataset_utils import image_dataset_from_directory from keras.src.utils.text_dataset_utils import text_dataset_from_directory from keras.src.utils.timeseries_dataset_utils import ( timeseries_dataset_from_array, ) + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras._tf_keras.keras.preprocessing import image +from keras._tf_keras.keras.preprocessing import sequence +from keras._tf_keras.keras.preprocessing import text diff --git a/keras/api/_tf_keras/keras/preprocessing/image/__init__.py b/keras/api/_tf_keras/keras/preprocessing/image/__init__.py index f68afe8789d..070878f2956 100644 --- a/keras/api/_tf_keras/keras/preprocessing/image/__init__.py +++ b/keras/api/_tf_keras/keras/preprocessing/image/__init__.py @@ -9,3 +9,24 @@ from keras.src.utils.image_utils import load_img from keras.src.utils.image_utils import save_img from keras.src.utils.image_utils import smart_resize + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.legacy.preprocessing.image import DirectoryIterator +from keras.src.legacy.preprocessing.image import ImageDataGenerator +from keras.src.legacy.preprocessing.image import Iterator +from keras.src.legacy.preprocessing.image import NumpyArrayIterator +from keras.src.legacy.preprocessing.image import apply_affine_transform +from keras.src.legacy.preprocessing.image import apply_brightness_shift +from keras.src.legacy.preprocessing.image import apply_channel_shift +from keras.src.legacy.preprocessing.image import random_brightness +from keras.src.legacy.preprocessing.image import random_channel_shift +from keras.src.legacy.preprocessing.image import random_rotation +from keras.src.legacy.preprocessing.image import random_shear +from keras.src.legacy.preprocessing.image import random_shift +from keras.src.legacy.preprocessing.image import random_zoom diff --git a/keras/api/_tf_keras/keras/preprocessing/sequence/__init__.py b/keras/api/_tf_keras/keras/preprocessing/sequence/__init__.py index 188e01af9c4..fbfdfaffe36 100644 --- a/keras/api/_tf_keras/keras/preprocessing/sequence/__init__.py +++ b/keras/api/_tf_keras/keras/preprocessing/sequence/__init__.py @@ -5,3 +5,14 @@ """ from keras.src.utils.sequence_utils import pad_sequences + +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + + +from keras.src.legacy.preprocessing.sequence import TimeseriesGenerator +from keras.src.legacy.preprocessing.sequence import make_sampling_table +from keras.src.legacy.preprocessing.sequence import skipgrams diff --git a/keras/api/_tf_keras/keras/preprocessing/text/__init__.py b/keras/api/_tf_keras/keras/preprocessing/text/__init__.py new file mode 100644 index 00000000000..2e8799f3d5d --- /dev/null +++ b/keras/api/_tf_keras/keras/preprocessing/text/__init__.py @@ -0,0 +1,11 @@ +"""DO NOT EDIT. + +This file was autogenerated. Do not edit it by hand, +since your modifications would be overwritten. +""" + +from keras.src.legacy.preprocessing.text import Tokenizer +from keras.src.legacy.preprocessing.text import hashing_trick +from keras.src.legacy.preprocessing.text import one_hot +from keras.src.legacy.preprocessing.text import text_to_word_sequence +from keras.src.legacy.preprocessing.text import tokenizer_from_json diff --git a/keras/src/version.py b/keras/src/version.py index 36b1de170ae..3f3890b17af 100644 --- a/keras/src/version.py +++ b/keras/src/version.py @@ -1,7 +1,7 @@ from keras.src.api_export import keras_export # Unique source of truth for the version number. -__version__ = "3.3.1" +__version__ = "3.3.2" @keras_export("keras.version") diff --git a/pip_build.py b/pip_build.py index ff3ddf78a6c..d0c73a27efa 100644 --- a/pip_build.py +++ b/pip_build.py @@ -84,8 +84,11 @@ def build(root_path, is_nightly=False, rc_index=None): try: copy_source_to_build_directory(root_path) create_legacy_directory() - from keras.src.version import __version__ # noqa: E402 + print(os.getcwd()) + # from keras.src.version import __version__ # noqa: E402 + + __version__ = "3.3.2" export_version_string(__version__, is_nightly, rc_index) return build_and_save_output(root_path, __version__) finally: