Package: keras3 1.0.0.9000

Tomasz Kalinowski

keras3: R Interface to 'Keras'

Interface to 'Keras' <https://keras.io>, a high-level neural networks API. 'Keras' was developed with a focus on enabling fast experimentation, supports both convolution based networks and recurrent networks (as well as combinations of the two), and runs seamlessly on both CPU and GPU devices.

Authors:Tomasz Kalinowski [aut, cph, cre], Daniel Falbel [ctb, cph], JJ Allaire [aut, cph], Fran├žois Chollet [aut, cph], Posit Software, PBC [cph, fnd], Google [cph, fnd], Yuan Tang [ctb, cph], Wouter Van Der Bijl [ctb, cph], Martin Studer [ctb, cph], Sigrid Keydana [ctb]

keras3_1.0.0.9000.tar.gz
keras3_1.0.0.9000.zip(r-4.5)keras3_1.0.0.9000.zip(r-4.4)keras3_1.0.0.9000.zip(r-4.3)
keras3_1.0.0.9000.tgz(r-4.4-any)keras3_1.0.0.9000.tgz(r-4.3-any)
keras3_1.0.0.9000.tar.gz(r-4.5-noble)keras3_1.0.0.9000.tar.gz(r-4.4-noble)
keras3_1.0.0.9000.tgz(r-4.4-emscripten)keras3_1.0.0.9000.tgz(r-4.3-emscripten)
keras3.pdf |keras3.html
keras3/json (API)
NEWS

# Install keras3 in R:
install.packages('keras3', repos = c('https://rstudio.r-universe.dev', 'https://cloud.r-project.org'))

Peer review:

Bug tracker:https://github.com/rstudio/keras3/issues

On CRAN:

660 exports 830 stars 8.74 score 33 dependencies 2.9k downloads

Last updated 8 days agofrom:fa07f20ea4c33a0950a4184fb1049ad6ae5a0804

Exports:%<-%%<-active%%<>%%>%%py_class%activation_eluactivation_exponentialactivation_geluactivation_hard_sigmoidactivation_hard_siluactivation_hard_swishactivation_leaky_reluactivation_linearactivation_log_softmaxactivation_mishactivation_reluactivation_relu6activation_seluactivation_sigmoidactivation_siluactivation_softmaxactivation_softplusactivation_softsignactivation_tanhactive_propertyadaptall_dimsapplication_convnext_baseapplication_convnext_largeapplication_convnext_smallapplication_convnext_tinyapplication_convnext_xlargeapplication_decode_predictionsapplication_densenet121application_densenet169application_densenet201application_efficientnet_b0application_efficientnet_b1application_efficientnet_b2application_efficientnet_b3application_efficientnet_b4application_efficientnet_b5application_efficientnet_b6application_efficientnet_b7application_efficientnet_v2b0application_efficientnet_v2b1application_efficientnet_v2b2application_efficientnet_v2b3application_efficientnet_v2lapplication_efficientnet_v2mapplication_efficientnet_v2sapplication_inception_resnet_v2application_inception_v3application_mobilenetapplication_mobilenet_v2application_mobilenet_v3_largeapplication_mobilenet_v3_smallapplication_nasnetlargeapplication_nasnetmobileapplication_preprocess_inputsapplication_resnet101application_resnet101_v2application_resnet152application_resnet152_v2application_resnet50application_resnet50_v2application_vgg16application_vgg19application_xceptionarray_reshapeas_iteratoras_tensoraudio_dataset_from_directorybidirectionalCallbackcallback_backup_and_restorecallback_csv_loggercallback_early_stoppingcallback_lambdacallback_learning_rate_schedulercallback_model_checkpointcallback_reduce_lr_on_plateaucallback_remote_monitorcallback_swap_ema_weightscallback_tensorboardcallback_terminate_on_nanclear_sessionclone_modelcompileconfig_backendconfig_disable_interactive_loggingconfig_disable_traceback_filteringconfig_dtype_policyconfig_enable_interactive_loggingconfig_enable_traceback_filteringconfig_enable_unsafe_deserializationconfig_epsilonconfig_floatxconfig_image_data_formatconfig_is_interactive_logging_enabledconfig_is_traceback_filtering_enabledconfig_set_backendconfig_set_dtype_policyconfig_set_epsilonconfig_set_floatxconfig_set_image_data_formatConstraintconstraint_maxnormconstraint_minmaxnormconstraint_nonnegconstraint_unitnormcount_paramscustom_metricdataset_boston_housingdataset_cifar10dataset_cifar100dataset_fashion_mnistdataset_imdbdataset_imdb_word_indexdataset_mnistdataset_reutersdataset_reuters_word_indexdeserialize_keras_objectevaluateexport_savedmodelfeature_crossfeature_customfeature_floatfeature_float_discretizedfeature_float_normalizedfeature_float_rescaledfeature_integer_categoricalfeature_integer_hashedfeature_string_categoricalfeature_string_hashedfitflag_booleanflag_integerflag_numericflag_stringflagsfreeze_weightsfrom_configget_configget_custom_objectsget_fileget_layerget_registered_nameget_registered_objectget_source_inputsget_vocabularyget_weightsimage_array_saveimage_dataset_from_directoryimage_from_arrayimage_loadimage_smart_resizeimage_to_arrayimagenet_decode_predictionsimagenet_preprocess_inputinitializer_constantinitializer_glorot_normalinitializer_glorot_uniforminitializer_he_normalinitializer_he_uniforminitializer_identityinitializer_lecun_normalinitializer_lecun_uniforminitializer_onesinitializer_orthogonalinitializer_random_normalinitializer_random_uniforminitializer_truncated_normalinitializer_variance_scalinginitializer_zerosinstall_kerasiter_nextiteratekeraskeras_inputkeras_modelkeras_model_sequentialLayerlayer_activationlayer_activation_elulayer_activation_leaky_relulayer_activation_parametric_relulayer_activation_relulayer_activation_softmaxlayer_activity_regularizationlayer_addlayer_additive_attentionlayer_alpha_dropoutlayer_attentionlayer_averagelayer_average_pooling_1dlayer_average_pooling_2dlayer_average_pooling_3dlayer_batch_normalizationlayer_bidirectionallayer_category_encodinglayer_center_croplayer_concatenatelayer_conv_1dlayer_conv_1d_transposelayer_conv_2dlayer_conv_2d_transposelayer_conv_3dlayer_conv_3d_transposelayer_conv_lstm_1dlayer_conv_lstm_2dlayer_conv_lstm_3dlayer_cropping_1dlayer_cropping_2dlayer_cropping_3dlayer_denselayer_depthwise_conv_1dlayer_depthwise_conv_2dlayer_discretizationlayer_dotlayer_dropoutlayer_einsum_denselayer_embeddinglayer_feature_spacelayer_flattenlayer_flax_module_wrapperlayer_gaussian_dropoutlayer_gaussian_noiselayer_global_average_pooling_1dlayer_global_average_pooling_2dlayer_global_average_pooling_3dlayer_global_max_pooling_1dlayer_global_max_pooling_2dlayer_global_max_pooling_3dlayer_group_normalizationlayer_group_query_attentionlayer_grulayer_hashed_crossinglayer_hashinglayer_identitylayer_inputlayer_integer_lookuplayer_jax_model_wrapperlayer_lambdalayer_layer_normalizationlayer_lstmlayer_maskinglayer_max_pooling_1dlayer_max_pooling_2dlayer_max_pooling_3dlayer_maximumlayer_mel_spectrogramlayer_minimumlayer_multi_head_attentionlayer_multiplylayer_normalizationlayer_permutelayer_random_brightnesslayer_random_contrastlayer_random_croplayer_random_fliplayer_random_rotationlayer_random_translationlayer_random_zoomlayer_repeat_vectorlayer_rescalinglayer_reshapelayer_resizinglayer_rnnlayer_separable_conv_1dlayer_separable_conv_2dlayer_simple_rnnlayer_spatial_dropout_1dlayer_spatial_dropout_2dlayer_spatial_dropout_3dlayer_spectral_normalizationlayer_string_lookuplayer_subtractlayer_text_vectorizationlayer_tfsmlayer_time_distributedlayer_torch_module_wrapperlayer_unit_normalizationlayer_upsampling_1dlayer_upsampling_2dlayer_upsampling_3dlayer_zero_padding_1dlayer_zero_padding_2dlayer_zero_padding_3dlearning_rate_schedule_cosine_decaylearning_rate_schedule_cosine_decay_restartslearning_rate_schedule_exponential_decaylearning_rate_schedule_inverse_time_decaylearning_rate_schedule_piecewise_constant_decaylearning_rate_schedule_polynomial_decayload_modelload_model_configload_model_weightsLossloss_binary_crossentropyloss_binary_focal_crossentropyloss_categorical_crossentropyloss_categorical_focal_crossentropyloss_categorical_hingeloss_cosine_similarityloss_ctcloss_diceloss_hingeloss_huberloss_kl_divergenceloss_log_coshloss_mean_absolute_errorloss_mean_absolute_percentage_errorloss_mean_squared_errorloss_mean_squared_logarithmic_errorloss_poissonloss_sparse_categorical_crossentropyloss_squared_hingeloss_tverskymark_activeMetricmetric_aucmetric_binary_accuracymetric_binary_crossentropymetric_binary_focal_crossentropymetric_binary_ioumetric_categorical_accuracymetric_categorical_crossentropymetric_categorical_focal_crossentropymetric_categorical_hingemetric_cosine_similaritymetric_f1_scoremetric_false_negativesmetric_false_positivesmetric_fbeta_scoremetric_hingemetric_hubermetric_ioumetric_kl_divergencemetric_log_coshmetric_log_cosh_errormetric_meanmetric_mean_absolute_errormetric_mean_absolute_percentage_errormetric_mean_ioumetric_mean_squared_errormetric_mean_squared_logarithmic_errormetric_mean_wrappermetric_one_hot_ioumetric_one_hot_mean_ioumetric_poissonmetric_precisionmetric_precision_at_recallmetric_r2_scoremetric_recallmetric_recall_at_precisionmetric_root_mean_squared_errormetric_sensitivity_at_specificitymetric_sparse_categorical_accuracymetric_sparse_categorical_crossentropymetric_sparse_top_k_categorical_accuracymetric_specificity_at_sensitivitymetric_squared_hingemetric_summetric_top_k_categorical_accuracymetric_true_negativesmetric_true_positivesModelnew_callback_classnew_layer_classnew_learning_rate_schedule_classnew_loss_classnew_metric_classnew_model_classnormalizenp_arrayop_absop_addop_allop_anyop_appendop_arangeop_arccosop_arccoshop_arcsinop_arcsinhop_arctanop_arctan2op_arctanhop_argmaxop_argminop_argsortop_arrayop_averageop_average_poolop_batch_normalizationop_binary_crossentropyop_bincountop_broadcast_toop_castop_categorical_crossentropyop_ceilop_choleskyop_clipop_concatenateop_condop_conjop_convop_conv_transposeop_convert_to_numpyop_convert_to_tensorop_copyop_correlateop_cosop_coshop_count_nonzeroop_crossop_ctc_decodeop_ctc_lossop_cumprodop_cumsumop_custom_gradientop_depthwise_convop_detop_diagop_diagonalop_diffop_digitizeop_divideop_divide_no_nanop_dotop_eigop_eighop_einsumop_eluop_emptyop_equalop_erfop_erfinvop_expop_expand_dimsop_expm1op_extract_sequencesop_eyeop_fftop_fft2op_flipop_floorop_floor_divideop_fori_loopop_fullop_full_likeop_geluop_get_itemop_greaterop_greater_equalop_hard_sigmoidop_hard_siluop_hard_swishop_hstackop_identityop_imagop_image_affine_transformop_image_cropop_image_extract_patchesop_image_map_coordinatesop_image_padop_image_resizeop_image_rgb_to_grayscaleop_in_top_kop_invop_irfftop_is_tensorop_iscloseop_isfiniteop_isinfop_isnanop_istftop_leaky_reluop_lessop_less_equalop_linspaceop_logop_log_sigmoidop_log_softmaxop_log10op_log1pop_log2op_logaddexpop_logical_andop_logical_notop_logical_orop_logical_xorop_logspaceop_logsumexpop_lu_factorop_matmulop_maxop_max_poolop_maximumop_meanop_medianop_meshgridop_minop_minimumop_modop_momentsop_moveaxisop_multi_hotop_multiplyop_nan_to_numop_ndimop_negativeop_nonzeroop_normop_normalizeop_not_equalop_one_hotop_onesop_ones_likeop_outerop_padop_pmaxop_pminop_powerop_prodop_psnrop_qrop_quantileop_ravelop_realop_reciprocalop_reluop_relu6op_repeatop_reshapeop_rfftop_rollop_roundop_rsqrtop_scatterop_scatter_updateop_segment_maxop_segment_sumop_selectop_seluop_separable_convop_shapeop_sigmoidop_signop_siluop_sinop_sinhop_sizeop_sliceop_slice_updateop_slogdetop_softmaxop_softplusop_softsignop_solveop_solve_triangularop_sortop_sparse_categorical_crossentropyop_splitop_sqrtop_squareop_squeezeop_stackop_stdop_stftop_stop_gradientop_subtractop_sumop_svdop_swapaxesop_takeop_take_along_axisop_tanop_tanhop_tensordotop_tileop_top_kop_traceop_transposeop_triop_trilop_triuop_unstackop_varop_vdotop_vectorizeop_vectorized_mapop_vstackop_whereop_while_loopop_zerosop_zeros_likeoptimizer_adadeltaoptimizer_adafactoroptimizer_adagradoptimizer_adamoptimizer_adam_woptimizer_adamaxoptimizer_ftrloptimizer_lionoptimizer_loss_scaleoptimizer_nadamoptimizer_rmspropoptimizer_sgdpad_sequencespop_layerpredict_on_batchquantize_weightsrandom_betarandom_binomialrandom_categoricalrandom_dropoutrandom_gammarandom_integerrandom_normalrandom_seed_generatorrandom_shufflerandom_truncated_normalrandom_uniformregister_keras_serializableregularizer_l1regularizer_l1_l2regularizer_l2regularizer_orthogonalreset_staternn_cell_grurnn_cell_lstmrnn_cell_simplernn_cells_stackrun_dirsave_modelsave_model_configsave_model_weightsserialize_keras_objectset_custom_objectsset_random_seedset_vocabularyset_weightsshapesplit_datasettensorboardtest_on_batchtext_dataset_from_directorytime_distributedtimeseries_dataset_from_arrayto_categoricaltrain_on_batchtupleunfreeze_weightsuse_backenduse_pythonuse_virtualenvwith_custom_object_scopezip_lists

Dependencies:backportsbase64enccliconfigfastmapgenericsglueherejsonlitelatticelifecyclemagrittrMatrixpngprocessxpsR6rappdirsRcppRcppTOMLreticulaterlangrprojrootrstudioapitensorflowtfautographtfrunstidyselectvctrswhiskerwithryamlzeallot

Customizing what happens in fit() with TensorFlow

Rendered fromcustom_train_step_in_tensorflow.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Distributed training with Keras 3

Rendered fromdistribution.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-04-02

Getting Started with Keras

Rendered fromgetting_started.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2017-08-29

Introduction to Keras for engineers

Rendered fromintro_to_keras_for_engineers.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Introduction to Keras for Researchers

Rendered fromintro_to_keras_for_researchers.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Making new layers and models via subclassing

Rendered frommaking_new_layers_and_models_via_subclassing.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Multi-GPU distributed training with TensorFlow

Rendered fromdistributed_training_with_tensorflow.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Save, serialize, and export models

Rendered fromserialization_and_saving.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

The Functional API

Rendered fromfunctional_api.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2017-04-03

The Sequential model

Rendered fromsequential_model.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2017-04-03

Training & evaluation with the built-in methods

Rendered fromtraining_with_built_in_methods.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Transfer learning & fine-tuning

Rendered fromtransfer_learning.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Understanding masking & padding

Rendered fromunderstanding_masking_and_padding.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Writing a training loop from scratch in TensorFlow

Rendered fromwriting_a_custom_training_loop_in_tensorflow.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Writing your own callbacks

Rendered fromwriting_your_own_callbacks.Rmdusingknitr::rmarkdownon Jun 13 2024.

Last update: 2024-05-21
Started: 2024-01-18

Readme and manuals

Help Manual

Help pageTopics
Exponential Linear Unit.activation_elu
Exponential activation function.activation_exponential
Gaussian error linear unit (GELU) activation function.activation_gelu
Hard sigmoid activation function.activation_hard_sigmoid
Hard SiLU activation function, also known as Hard Swish.activation_hard_silu activation_hard_swish
Leaky relu activation function.activation_leaky_relu
Linear activation function (pass-through).activation_linear
Log-Softmax activation function.activation_log_softmax
Mish activation function.activation_mish
Applies the rectified linear unit activation function.activation_relu
Relu6 activation function.activation_relu6
Scaled Exponential Linear Unit (SELU).activation_selu
Sigmoid activation function.activation_sigmoid
Swish (or Silu) activation function.activation_silu
Softmax converts a vector of values to a probability distribution.activation_softmax
Softplus activation function.activation_softplus
Softsign activation function.activation_softsign
Hyperbolic tangent activation function.activation_tanh
Create an active property class methodactive_property
Fits the state of the preprocessing layer to the data being passedadapt
Instantiates the ConvNeXtBase architecture.application_convnext_base
Instantiates the ConvNeXtLarge architecture.application_convnext_large
Instantiates the ConvNeXtSmall architecture.application_convnext_small
Instantiates the ConvNeXtTiny architecture.application_convnext_tiny
Instantiates the ConvNeXtXLarge architecture.application_convnext_xlarge
Instantiates the Densenet121 architecture.application_densenet121
Instantiates the Densenet169 architecture.application_densenet169
Instantiates the Densenet201 architecture.application_densenet201
Instantiates the EfficientNetB0 architecture.application_efficientnet_b0
Instantiates the EfficientNetB1 architecture.application_efficientnet_b1
Instantiates the EfficientNetB2 architecture.application_efficientnet_b2
Instantiates the EfficientNetB3 architecture.application_efficientnet_b3
Instantiates the EfficientNetB4 architecture.application_efficientnet_b4
Instantiates the EfficientNetB5 architecture.application_efficientnet_b5
Instantiates the EfficientNetB6 architecture.application_efficientnet_b6
Instantiates the EfficientNetB7 architecture.application_efficientnet_b7
Instantiates the EfficientNetV2B0 architecture.application_efficientnet_v2b0
Instantiates the EfficientNetV2B1 architecture.application_efficientnet_v2b1
Instantiates the EfficientNetV2B2 architecture.application_efficientnet_v2b2
Instantiates the EfficientNetV2B3 architecture.application_efficientnet_v2b3
Instantiates the EfficientNetV2L architecture.application_efficientnet_v2l
Instantiates the EfficientNetV2M architecture.application_efficientnet_v2m
Instantiates the EfficientNetV2S architecture.application_efficientnet_v2s
Instantiates the Inception-ResNet v2 architecture.application_inception_resnet_v2
Instantiates the Inception v3 architecture.application_inception_v3
Instantiates the MobileNet architecture.application_mobilenet
Instantiates the MobileNetV2 architecture.application_mobilenet_v2
Instantiates the MobileNetV3Large architecture.application_mobilenet_v3_large
Instantiates the MobileNetV3Small architecture.application_mobilenet_v3_small
Instantiates a NASNet model in ImageNet mode.application_nasnetlarge
Instantiates a Mobile NASNet model in ImageNet mode.application_nasnetmobile
Instantiates the ResNet101 architecture.application_resnet101
Instantiates the ResNet101V2 architecture.application_resnet101_v2
Instantiates the ResNet152 architecture.application_resnet152
Instantiates the ResNet152V2 architecture.application_resnet152_v2
Instantiates the ResNet50 architecture.application_resnet50
Instantiates the ResNet50V2 architecture.application_resnet50_v2
Instantiates the VGG16 model.application_vgg16
Instantiates the VGG19 model.application_vgg19
Instantiates the Xception architecture.application_xception
Generates a 'tf.data.Dataset' from audio files in a directory.audio_dataset_from_directory
Define a custom 'Callback' classCallback
Callback to back up and restore the training state.callback_backup_and_restore
Callback that streams epoch results to a CSV file.callback_csv_logger
Stop training when a monitored metric has stopped improving.callback_early_stopping
Callback for creating simple, custom callbacks on-the-fly.callback_lambda
Learning rate scheduler.callback_learning_rate_scheduler
Callback to save the Keras model or model weights at some frequency.callback_model_checkpoint
Reduce learning rate when a metric has stopped improving.callback_reduce_lr_on_plateau
Callback used to stream events to a server.callback_remote_monitor
Swaps model weights and EMA weights before and after evaluation.callback_swap_ema_weights
Enable visualizations for TensorBoard.callback_tensorboard
Callback that terminates training when a NaN loss is encountered.callback_terminate_on_nan
Resets all state generated by Keras.clear_session
Clone a Functional or Sequential 'Model' instance.clone_model
Configure a model for training.compile.keras.src.models.model.Model
Publicly accessible method for determining the current backend.config_backend
Turn off interactive logging.config_disable_interactive_logging
Turn off traceback filtering.config_disable_traceback_filtering
Returns the current default dtype policy object.config_dtype_policy
Turn on interactive logging.config_enable_interactive_logging
Turn on traceback filtering.config_enable_traceback_filtering
Disables safe mode globally, allowing deserialization of lambdas.config_enable_unsafe_deserialization
Return the value of the fuzz factor used in numeric expressions.config_epsilon
Return the default float type, as a string.config_floatx
Return the default image data format convention.config_image_data_format
Check if interactive logging is enabled.config_is_interactive_logging_enabled
Check if traceback filtering is enabled.config_is_traceback_filtering_enabled
Reload the backend (and the Keras package).config_set_backend
Sets the default dtype policy globally.config_set_dtype_policy
Set the value of the fuzz factor used in numeric expressions.config_set_epsilon
Set the default float dtype.config_set_floatx
Set the value of the image data format convention.config_set_image_data_format
Define a custom 'Constraint' classConstraint
MaxNorm weight constraint.constraint_maxnorm
MinMaxNorm weight constraint.constraint_minmaxnorm
Constrains the weights to be non-negative.constraint_nonneg
Constrains the weights incident to each hidden unit to have unit norm.constraint_unitnorm
Count the total number of scalars composing the weights.count_params
Custom metric functioncustom_metric
Boston housing price regression datasetdataset_boston_housing
CIFAR10 small image classificationdataset_cifar10
CIFAR100 small image classificationdataset_cifar100
Fashion-MNIST database of fashion articlesdataset_fashion_mnist
IMDB Movie reviews sentiment classificationdataset_imdb dataset_imdb_word_index
MNIST database of handwritten digitsdataset_mnist
Reuters newswire topics classificationdataset_reuters dataset_reuters_word_index
Retrieve the object by deserializing the config dict.deserialize_keras_object
Evaluate a Keras Modelevaluate.keras.src.models.model.Model
Create a TF SavedModel artifact for inference (e.g. via TF-Serving).export_savedmodel.keras.src.models.model.Model
Train a model for a fixed number of epochs (dataset iterations).fit.keras.src.models.model.Model
Freeze and unfreeze weightsfreeze_weights unfreeze_weights
Layer/Model configurationfrom_config get_config
Get/set the currently registered custom objects.get_custom_objects set_custom_objects
Downloads a file from a URL if it not already in the cache.get_file
Retrieves a layer based on either its name (unique) or index.get_layer
Returns the name registered to an object within the Keras framework.get_registered_name
Returns the class associated with 'name' if it is registered with Keras.get_registered_object
Returns the list of input tensors necessary to compute 'tensor'.get_source_inputs
Layer/Model weights as R arraysget_weights set_weights
Saves an image stored as an array to a path or file object.image_array_save
Generates a 'tf.data.Dataset' from image files in a directory.image_dataset_from_directory
Converts a 3D array to a PIL Image instance.image_from_array
Loads an image into PIL format.image_load
Resize images to a target size without aspect ratio distortion.image_smart_resize
Converts a PIL Image instance to a matrix.image_to_array
Initializer that generates tensors with constant values.initializer_constant
The Glorot normal initializer, also called Xavier normal initializer.initializer_glorot_normal
The Glorot uniform initializer, also called Xavier uniform initializer.initializer_glorot_uniform
He normal initializer.initializer_he_normal
He uniform variance scaling initializer.initializer_he_uniform
Initializer that generates the identity matrix.initializer_identity
Lecun normal initializer.initializer_lecun_normal
Lecun uniform initializer.initializer_lecun_uniform
Initializer that generates tensors initialized to 1.initializer_ones
Initializer that generates an orthogonal matrix.initializer_orthogonal
Random normal initializer.initializer_random_normal
Random uniform initializer.initializer_random_uniform
Initializer that generates a truncated normal distribution.initializer_truncated_normal
Initializer that adapts its scale to the shape of its input tensors.initializer_variance_scaling
Initializer that generates tensors initialized to 0.initializer_zeros
Install Kerasinstall_keras
Main Keras modulekeras
Create a Keras tensor (Functional API input).keras_input
Keras Model (Functional API)keras_model
Keras Model composed of a linear stack of layerskeras_model_sequential
Define a custom 'Layer' class.Layer
Applies an activation function to an output.layer_activation
Applies an Exponential Linear Unit function to an output.layer_activation_elu
Leaky version of a Rectified Linear Unit activation layer.layer_activation_leaky_relu
Parametric Rectified Linear Unit activation layer.layer_activation_parametric_relu
Rectified Linear Unit activation function layer.layer_activation_relu
Softmax activation layer.layer_activation_softmax
Layer that applies an update to the cost function based input activity.layer_activity_regularization
Performs elementwise addition operation.layer_add
Additive attention layer, a.k.a. Bahdanau-style attention.layer_additive_attention
Applies Alpha Dropout to the input.layer_alpha_dropout
Dot-product attention layer, a.k.a. Luong-style attention.layer_attention
Averages a list of inputs element-wise..layer_average
Average pooling for temporal data.layer_average_pooling_1d
Average pooling operation for 2D spatial data.layer_average_pooling_2d
Average pooling operation for 3D data (spatial or spatio-temporal).layer_average_pooling_3d
Layer that normalizes its inputs.layer_batch_normalization
Bidirectional wrapper for RNNs.layer_bidirectional
A preprocessing layer which encodes integer features.layer_category_encoding
A preprocessing layer which crops images.layer_center_crop
Concatenates a list of inputs.layer_concatenate
1D convolution layer (e.g. temporal convolution).layer_conv_1d
1D transposed convolution layer.layer_conv_1d_transpose
2D convolution layer.layer_conv_2d
2D transposed convolution layer.layer_conv_2d_transpose
3D convolution layer.layer_conv_3d
3D transposed convolution layer.layer_conv_3d_transpose
1D Convolutional LSTM.layer_conv_lstm_1d
2D Convolutional LSTM.layer_conv_lstm_2d
3D Convolutional LSTM.layer_conv_lstm_3d
Cropping layer for 1D input (e.g. temporal sequence).layer_cropping_1d
Cropping layer for 2D input (e.g. picture).layer_cropping_2d
Cropping layer for 3D data (e.g. spatial or spatio-temporal).layer_cropping_3d
Just your regular densely-connected NN layer.layer_dense
1D depthwise convolution layer.layer_depthwise_conv_1d
2D depthwise convolution layer.layer_depthwise_conv_2d
A preprocessing layer which buckets continuous features by ranges.layer_discretization
Computes element-wise dot product of two tensors.layer_dot
Applies dropout to the input.layer_dropout
A layer that uses 'einsum' as the backing computation.layer_einsum_dense
Turns positive integers (indexes) into dense vectors of fixed size.layer_embedding
One-stop utility for preprocessing and encoding structured data.feature_cross feature_custom feature_float feature_float_discretized feature_float_normalized feature_float_rescaled feature_integer_categorical feature_integer_hashed feature_string_categorical feature_string_hashed layer_feature_space
Flattens the input. Does not affect the batch size.layer_flatten
Keras Layer that wraps a Flax module.layer_flax_module_wrapper
Apply multiplicative 1-centered Gaussian noise.layer_gaussian_dropout
Apply additive zero-centered Gaussian noise.layer_gaussian_noise
Global average pooling operation for temporal data.layer_global_average_pooling_1d
Global average pooling operation for 2D data.layer_global_average_pooling_2d
Global average pooling operation for 3D data.layer_global_average_pooling_3d
Global max pooling operation for temporal data.layer_global_max_pooling_1d
Global max pooling operation for 2D data.layer_global_max_pooling_2d
Global max pooling operation for 3D data.layer_global_max_pooling_3d
Group normalization layer.layer_group_normalization
Grouped Query Attention layer.layer_group_query_attention
Gated Recurrent Unit - Cho et al. 2014.layer_gru
A preprocessing layer which crosses features using the "hashing trick".layer_hashed_crossing
A preprocessing layer which hashes and bins categorical features.layer_hashing
Identity layer.layer_identity
A preprocessing layer that maps integers to (possibly encoded) indices.layer_integer_lookup
Keras Layer that wraps a JAX model.layer_jax_model_wrapper
Wraps arbitrary expressions as a 'Layer' object.layer_lambda
Layer normalization layer (Ba et al., 2016).layer_layer_normalization
Long Short-Term Memory layer - Hochreiter 1997.layer_lstm
Masks a sequence by using a mask value to skip timesteps.layer_masking
Max pooling operation for 1D temporal data.layer_max_pooling_1d
Max pooling operation for 2D spatial data.layer_max_pooling_2d
Max pooling operation for 3D data (spatial or spatio-temporal).layer_max_pooling_3d
Computes element-wise maximum on a list of inputs.layer_maximum
A preprocessing layer to convert raw audio signals to Mel spectrograms.layer_mel_spectrogram
Computes elementwise minimum on a list of inputs.layer_minimum
Multi Head Attention layer.layer_multi_head_attention
Performs elementwise multiplication.layer_multiply
A preprocessing layer that normalizes continuous features.layer_normalization
Permutes the dimensions of the input according to a given pattern.layer_permute
A preprocessing layer which randomly adjusts brightness during training.layer_random_brightness
A preprocessing layer which randomly adjusts contrast during training.layer_random_contrast
A preprocessing layer which randomly crops images during training.layer_random_crop
A preprocessing layer which randomly flips images during training.layer_random_flip
A preprocessing layer which randomly rotates images during training.layer_random_rotation
A preprocessing layer which randomly translates images during training.layer_random_translation
A preprocessing layer which randomly zooms images during training.layer_random_zoom
Repeats the input n times.layer_repeat_vector
A preprocessing layer which rescales input values to a new range.layer_rescaling
Layer that reshapes inputs into the given shape.layer_reshape
A preprocessing layer which resizes images.layer_resizing
Base class for recurrent layerslayer_rnn
1D separable convolution layer.layer_separable_conv_1d
2D separable convolution layer.layer_separable_conv_2d
Fully-connected RNN where the output is to be fed back as the new input.layer_simple_rnn
Spatial 1D version of Dropout.layer_spatial_dropout_1d
Spatial 2D version of Dropout.layer_spatial_dropout_2d
Spatial 3D version of Dropout.layer_spatial_dropout_3d
Performs spectral normalization on the weights of a target layer.layer_spectral_normalization
A preprocessing layer that maps strings to (possibly encoded) indices.layer_string_lookup
Performs elementwise subtraction.layer_subtract
A preprocessing layer which maps text features to integer sequences.get_vocabulary layer_text_vectorization set_vocabulary
Reload a Keras model/layer that was saved via 'export_savedmodel()'.layer_tfsm
This wrapper allows to apply a layer to every temporal slice of an input.layer_time_distributed
Torch module wrapper layer.layer_torch_module_wrapper
Unit normalization layer.layer_unit_normalization
Upsampling layer for 1D inputs.layer_upsampling_1d
Upsampling layer for 2D inputs.layer_upsampling_2d
Upsampling layer for 3D inputs.layer_upsampling_3d
Zero-padding layer for 1D input (e.g. temporal sequence).layer_zero_padding_1d
Zero-padding layer for 2D input (e.g. picture).layer_zero_padding_2d
Zero-padding layer for 3D data (spatial or spatio-temporal).layer_zero_padding_3d
A 'LearningRateSchedule' that uses a cosine decay with optional warmup.learning_rate_schedule_cosine_decay
A 'LearningRateSchedule' that uses a cosine decay schedule with restarts.learning_rate_schedule_cosine_decay_restarts
A 'LearningRateSchedule' that uses an exponential decay schedule.learning_rate_schedule_exponential_decay
A 'LearningRateSchedule' that uses an inverse time decay schedule.learning_rate_schedule_inverse_time_decay
A 'LearningRateSchedule' that uses a piecewise constant decay schedule.learning_rate_schedule_piecewise_constant_decay
A 'LearningRateSchedule' that uses a polynomial decay schedule.learning_rate_schedule_polynomial_decay
Define a custom 'LearningRateSchedule' classLearningRateSchedule
Loads a model saved via 'save_model()'.load_model
Load weights from a file saved via 'save_model_weights()'.load_model_weights
Subclass the base 'Loss' classLoss
Computes the cross-entropy loss between true labels and predicted labels.loss_binary_crossentropy
Computes focal cross-entropy loss between true labels and predictions.loss_binary_focal_crossentropy
Computes the crossentropy loss between the labels and predictions.loss_categorical_crossentropy
Computes the alpha balanced focal crossentropy loss.loss_categorical_focal_crossentropy
Computes the categorical hinge loss between 'y_true' & 'y_pred'.loss_categorical_hinge
Computes the cosine similarity between 'y_true' & 'y_pred'.loss_cosine_similarity
CTC (Connectionist Temporal Classification) loss.loss_ctc
Computes the Dice loss value between 'y_true' and 'y_pred'.loss_dice
Computes the hinge loss between 'y_true' & 'y_pred'.loss_hinge
Computes the Huber loss between 'y_true' & 'y_pred'.loss_huber
Computes Kullback-Leibler divergence loss between 'y_true' & 'y_pred'.loss_kl_divergence
Computes the logarithm of the hyperbolic cosine of the prediction error.loss_log_cosh
Computes the mean of absolute difference between labels and predictions.loss_mean_absolute_error
Computes the mean absolute percentage error between 'y_true' and 'y_pred'.loss_mean_absolute_percentage_error
Computes the mean of squares of errors between labels and predictions.loss_mean_squared_error
Computes the mean squared logarithmic error between 'y_true' and 'y_pred'.loss_mean_squared_logarithmic_error
Computes the Poisson loss between 'y_true' & 'y_pred'.loss_poisson
Computes the crossentropy loss between the labels and predictions.loss_sparse_categorical_crossentropy
Computes the squared hinge loss between 'y_true' & 'y_pred'.loss_squared_hinge
Computes the Tversky loss value between 'y_true' and 'y_pred'.loss_tversky
Subclass the base 'Metric' classMetric
Approximates the AUC (Area under the curve) of the ROC or PR curves.metric_auc
Calculates how often predictions match binary labels.metric_binary_accuracy
Computes the crossentropy metric between the labels and predictions.metric_binary_crossentropy
Computes the binary focal crossentropy loss.metric_binary_focal_crossentropy
Computes the Intersection-Over-Union metric for class 0 and/or 1.metric_binary_iou
Calculates how often predictions match one-hot labels.metric_categorical_accuracy
Computes the crossentropy metric between the labels and predictions.metric_categorical_crossentropy
Computes the categorical focal crossentropy loss.metric_categorical_focal_crossentropy
Computes the categorical hinge metric between 'y_true' and 'y_pred'.metric_categorical_hinge
Computes the cosine similarity between the labels and predictions.metric_cosine_similarity
Computes F-1 Score.metric_f1_score
Calculates the number of false negatives.metric_false_negatives
Calculates the number of false positives.metric_false_positives
Computes F-Beta score.metric_fbeta_score
Computes the hinge metric between 'y_true' and 'y_pred'.metric_hinge
Computes Huber loss value.metric_huber
Computes the Intersection-Over-Union metric for specific target classes.metric_iou
Computes Kullback-Leibler divergence metric between 'y_true' andmetric_kl_divergence
Logarithm of the hyperbolic cosine of the prediction error.metric_log_cosh
Computes the logarithm of the hyperbolic cosine of the prediction error.metric_log_cosh_error
Compute the (weighted) mean of the given values.metric_mean
Computes the mean absolute error between the labels and predictions.metric_mean_absolute_error
Computes mean absolute percentage error between 'y_true' and 'y_pred'.metric_mean_absolute_percentage_error
Computes the mean Intersection-Over-Union metric.metric_mean_iou
Computes the mean squared error between 'y_true' and 'y_pred'.metric_mean_squared_error
Computes mean squared logarithmic error between 'y_true' and 'y_pred'.metric_mean_squared_logarithmic_error
Wrap a stateless metric function with the 'Mean' metric.metric_mean_wrapper
Computes the Intersection-Over-Union metric for one-hot encoded labels.metric_one_hot_iou
Computes mean Intersection-Over-Union metric for one-hot encoded labels.metric_one_hot_mean_iou
Computes the Poisson metric between 'y_true' and 'y_pred'.metric_poisson
Computes the precision of the predictions with respect to the labels.metric_precision
Computes best precision where recall is >= specified value.metric_precision_at_recall
Computes R2 score.metric_r2_score
Computes the recall of the predictions with respect to the labels.metric_recall
Computes best recall where precision is >= specified value.metric_recall_at_precision
Computes root mean squared error metric between 'y_true' and 'y_pred'.metric_root_mean_squared_error
Computes best sensitivity where specificity is >= specified value.metric_sensitivity_at_specificity
Calculates how often predictions match integer labels.metric_sparse_categorical_accuracy
Computes the crossentropy metric between the labels and predictions.metric_sparse_categorical_crossentropy
Computes how often integer targets are in the top 'K' predictions.metric_sparse_top_k_categorical_accuracy
Computes best specificity where sensitivity is >= specified value.metric_specificity_at_sensitivity
Computes the hinge metric between 'y_true' and 'y_pred'.metric_squared_hinge
Compute the (weighted) sum of the given values.metric_sum
Computes how often targets are in the top 'K' predictions.metric_top_k_categorical_accuracy
Calculates the number of true negatives.metric_true_negatives
Calculates the number of true positives.metric_true_positives
Subclass the base Keras 'Model' ClassModel
Normalizes an array.normalize
Compute the absolute value element-wise.op_abs
Add arguments element-wise.op_add
Test whether all array elements along a given axis evaluate to 'TRUE'.op_all
Test whether any array element along a given axis evaluates to 'TRUE'.op_any
Append tensor 'x2' to the end of tensor 'x1'.op_append
Return evenly spaced values within a given interval.op_arange
Trigonometric inverse cosine, element-wise.op_arccos
Inverse hyperbolic cosine, element-wise.op_arccosh
Inverse sine, element-wise.op_arcsin
Inverse hyperbolic sine, element-wise.op_arcsinh
Trigonometric inverse tangent, element-wise.op_arctan
Element-wise arc tangent of 'x1/x2' choosing the quadrant correctly.op_arctan2
Inverse hyperbolic tangent, element-wise.op_arctanh
Returns the indices of the maximum values along an axis.op_argmax
Returns the indices of the minimum values along an axis.op_argmin
Returns the indices that would sort a tensor.op_argsort
Create a tensor.op_array
Compute the weighted average along the specified axis.op_average
Average pooling operation.op_average_pool
Normalizes 'x' by 'mean' and 'variance'.op_batch_normalization
Computes binary cross-entropy loss between target and output tensor.op_binary_crossentropy
Count the number of occurrences of each value in a tensor of integers.op_bincount
Broadcast a tensor to a new shape.op_broadcast_to
Cast a tensor to the desired dtype.op_cast
Computes categorical cross-entropy loss between target and output tensor.op_categorical_crossentropy
Return the ceiling of the input, element-wise.op_ceil
Computes the Cholesky decomposition of a positive semi-definite matrix.op_cholesky
Clip (limit) the values in a tensor.op_clip
Join a sequence of tensors along an existing axis.op_concatenate
Conditionally applies 'true_fn' or 'false_fn'.op_cond
Returns the complex conjugate, element-wise.op_conj
General N-D convolution.op_conv
General N-D convolution transpose.op_conv_transpose
Convert a tensor to a NumPy array.op_convert_to_numpy
Convert an array to a tensor.op_convert_to_tensor
Returns a copy of 'x'.op_copy
Compute the cross-correlation of two 1-dimensional tensors.op_correlate
Cosine, element-wise.op_cos
Hyperbolic cosine, element-wise.op_cosh
Counts the number of non-zero values in 'x' along the given 'axis'.op_count_nonzero
Returns the cross product of two (arrays of) vectors.op_cross
Decodes the output of a CTC model.op_ctc_decode
CTC (Connectionist Temporal Classification) loss.op_ctc_loss
Return the cumulative product of elements along a given axis.op_cumprod
Returns the cumulative sum of elements along a given axis.op_cumsum
Decorator to define a function with a custom gradient.op_custom_gradient
General N-D depthwise convolution.op_depthwise_conv
Computes the determinant of a square tensor.op_det
Extract a diagonal or construct a diagonal array.op_diag
Return specified diagonals.op_diagonal
Calculate the n-th discrete difference along the given axis.op_diff
Returns the indices of the bins to which each value in 'x' belongs.op_digitize
Divide arguments element-wise.op_divide
Safe element-wise division which returns 0 where the denominator is 0.op_divide_no_nan
Dot product of two tensors.op_dot
Computes the eigenvalues and eigenvectors of a square matrix.op_eig
Computes the eigenvalues and eigenvectors of a complex Hermitian.op_eigh
Evaluates the Einstein summation convention on the operands.op_einsum
Exponential Linear Unit activation function.op_elu
Return a tensor of given shape and type filled with uninitialized data.op_empty
Returns '(x1 == x2)' element-wise.op_equal
Computes the error function of 'x', element-wise.op_erf
Computes the inverse error function of 'x', element-wise.op_erfinv
Calculate the exponential of all elements in the input tensor.op_exp
Expand the shape of a tensor.op_expand_dims
Calculate 'exp(x) - 1' for all elements in the tensor.op_expm1
Expands the dimension of last axis into sequences of 'sequence_length'.op_extract_sequences
Return a 2-D tensor with ones on the diagonal and zeros elsewhere.op_eye
Computes the Fast Fourier Transform along last axis of input.op_fft
Computes the 2D Fast Fourier Transform along the last two axes of input.op_fft2
Reverse the order of elements in the tensor along the given axis.op_flip
Return the floor of the input, element-wise.op_floor
Returns the largest integer smaller or equal to the division of inputs.op_floor_divide
For loop implementation.op_fori_loop
Return a new tensor of given shape and type, filled with 'fill_value'.op_full
Return a full tensor with the same shape and type as the given tensor.op_full_like
Gaussian Error Linear Unit (GELU) activation function.op_gelu
Return 'x[key]'.op_get_item
Return the truth value of 'x1 > x2' element-wise.op_greater
Return the truth value of 'x1 >= x2' element-wise.op_greater_equal
Hard sigmoid activation function.op_hard_sigmoid
Hard SiLU activation function, also known as Hard Swish.op_hard_silu op_hard_swish
Stack tensors in sequence horizontally (column wise).op_hstack
Return the identity tensor.op_identity
Return the imaginary part of the complex argument.op_imag
Applies the given transform(s) to the image(s).op_image_affine_transform
Crop 'images' to a specified 'height' and 'width'.op_image_crop
Extracts patches from the image(s).op_image_extract_patches
Map the input array to new coordinates by interpolation..op_image_map_coordinates
Pad 'images' with zeros to the specified 'height' and 'width'.op_image_pad
Resize images to size using the specified interpolation method.op_image_resize
Convert RGB images to grayscale.op_image_rgb_to_grayscale
Checks if the targets are in the top-k predictions.op_in_top_k
Computes the inverse of a square tensor.op_inv
Inverse real-valued Fast Fourier transform along the last axis.op_irfft
Check whether the given object is a tensor.op_is_tensor
Return whether two tensors are element-wise almost equal.op_isclose
Return whether a tensor is finite, element-wise.op_isfinite
Test element-wise for positive or negative infinity.op_isinf
Test element-wise for NaN and return result as a boolean tensor.op_isnan
Inverse Short-Time Fourier Transform along the last axis of the input.op_istft
Leaky version of a Rectified Linear Unit activation function.op_leaky_relu
Return the truth value of 'x1 < x2' element-wise.op_less
Return the truth value of 'x1 <= x2' element-wise.op_less_equal
Return evenly spaced numbers over a specified interval.op_linspace
Natural logarithm, element-wise.op_log
Logarithm of the sigmoid activation function.op_log_sigmoid
Log-softmax activation function.op_log_softmax
Return the base 10 logarithm of the input tensor, element-wise.op_log10
Returns the natural logarithm of one plus the 'x', element-wise.op_log1p
Base-2 logarithm of 'x', element-wise.op_log2
Logarithm of the sum of exponentiations of the inputs.op_logaddexp
Computes the element-wise logical AND of the given input tensors.op_logical_and
Computes the element-wise NOT of the given input tensor.op_logical_not
Computes the element-wise logical OR of the given input tensors.op_logical_or
Compute the truth value of x1 XOR x2, element-wise.op_logical_xor
Returns numbers spaced evenly on a log scale.op_logspace
Computes the logarithm of sum of exponentials of elements in a tensor.op_logsumexp
Computes the lower-upper decomposition of a square matrix.op_lu_factor
Matrix product of two tensors.op_matmul
Return the maximum of a tensor or maximum along an axis.op_amax op_max
Max pooling operation.op_max_pool
Element-wise maximum of 'x1' and 'x2'.op_maximum op_pmax
Compute the arithmetic mean along the specified axes.op_mean
Compute the median along the specified axis.op_median
Creates grids of coordinates from coordinate vectors.op_meshgrid
Return the minimum of a tensor or minimum along an axis.op_amin op_min
Element-wise minimum of 'x1' and 'x2'.op_minimum op_pmin
Returns the element-wise remainder of division.op_mod
Calculates the mean and variance of 'x'.op_moments
Move axes of a tensor to new positions.op_moveaxis
Encodes integer labels as multi-hot vectors.op_multi_hot
Multiply arguments element-wise.op_multiply
Replace NaN with zero and infinity with large finite numbers.op_nan_to_num
Return the number of dimensions of a tensor.op_ndim
Numerical negative, element-wise.op_negative
Return the indices of the elements that are non-zero.op_nonzero
Matrix or vector norm.op_norm
Normalizes 'x' over the specified axis.op_normalize
Return '(x1 != x2)' element-wise.op_not_equal
Converts integer tensor 'x' into a one-hot tensor.op_one_hot
Return a new tensor of given shape and type, filled with ones.op_ones
Return a tensor of ones with the same shape and type of 'x'.op_ones_like
Compute the outer product of two vectors.op_outer
Pad a tensor.op_pad
First tensor elements raised to powers from second tensor, element-wise.op_power
Return the product of tensor elements over a given axis.op_prod
Peak Signal-to-Noise Ratio (PSNR) function.op_psnr
Computes the QR decomposition of a tensor.op_qr
Compute the q-th quantile(s) of the data along the specified axis.op_quantile
Return a contiguous flattened tensor.op_ravel
Return the real part of the complex argument.op_real
Return the reciprocal of the argument, element-wise.op_reciprocal
Rectified linear unit activation function.op_relu
Rectified linear unit activation function with upper bound of 6.op_relu6
Repeat each element of a tensor after themselves.op_repeat
Gives a new shape to a tensor without changing its data.op_reshape
Real-valued Fast Fourier Transform along the last axis of the input.op_rfft
Roll tensor elements along a given axis.op_roll
Evenly round to the given number of decimals.op_round
Computes reciprocal of square root of x element-wise.op_rsqrt
Returns a tensor of shape 'shape' where 'indices' are set to 'values'.op_scatter
Update inputs via updates at scattered (sparse) indices.op_scatter_update
Computes the max of segments in a tensor.op_segment_max
Computes the sum of segments in a tensor.op_segment_sum
Return elements from 'choicelist', based on conditions in 'condlist'.op_select
Scaled Exponential Linear Unit (SELU) activation function.op_selu
General N-D separable convolution.op_separable_conv
Gets the shape of the tensor input.op_shape
Sigmoid activation function.op_sigmoid
Returns a tensor with the signs of the elements of 'x'.op_sign
Sigmoid Linear Unit (SiLU) activation function, also known as Swish.op_silu
Trigonometric sine, element-wise.op_sin
Hyperbolic sine, element-wise.op_sinh
Return the number of elements in a tensor.op_size
Return a slice of an input tensor.op_slice
Update an input by slicing in a tensor of updated values.op_slice_update
Compute the sign and natural logarithm of the determinant of a matrix.op_slogdet
Softmax activation function.op_softmax
Softplus activation function.op_softplus
Softsign activation function.op_softsign
Solves a linear system of equations given by a x = b.op_solve
Solves a linear system of equations given by 'a %*% x = b'.op_solve_triangular
Sorts the elements of 'x' along a given axis in ascending order.op_sort
Computes sparse categorical cross-entropy loss.op_sparse_categorical_crossentropy
Split a tensor into chunks.op_split
Return the non-negative square root of a tensor, element-wise.op_sqrt
Return the element-wise square of the input.op_square
Remove axes of length one from 'x'.op_squeeze
Join a sequence of tensors along a new axis.op_stack
Compute the standard deviation along the specified axis.op_std
Short-Time Fourier Transform along the last axis of the input.op_stft
Stops gradient computation.op_stop_gradient
Subtract arguments element-wise.op_subtract
Sum of a tensor over the given axes.op_sum
Computes the singular value decomposition of a matrix.op_svd
Interchange two axes of a tensor.op_swapaxes
Take elements from a tensor along an axis.op_take
Select values from 'x' at the 1-D 'indices' along the given axis.op_take_along_axis
Compute tangent, element-wise.op_tan
Hyperbolic tangent, element-wise.op_tanh
Compute the tensor dot product along specified axes.op_tensordot
Repeat 'x' the number of times given by 'repeats'.op_tile
Finds the top-k values and their indices in a tensor.op_top_k
Return the sum along diagonals of the tensor.op_trace
Returns a tensor with 'axes' transposed.op_transpose
Return a tensor with ones at and below a diagonal and zeros elsewhere.op_tri
Return lower triangle of a tensor.op_tril
Return upper triangle of a tensor.op_triu
Unpacks the given dimension of a rank-R tensor into rank-(R-1) tensors.op_unstack
Compute the variance along the specified axes.op_var
Return the dot product of two vectors.op_vdot
Turn a function into a vectorized function.op_vectorize
Parallel map of function 'f' on the first axis of tensor(s) 'elements'.op_vectorized_map
Stack tensors in sequence vertically (row wise).op_vstack
Return elements chosen from 'x1' or 'x2' depending on 'condition'.op_where
While loop implementation.op_while_loop
Return a new tensor of given shape and type, filled with zeros.op_zeros
Return a tensor of zeros with the same shape and type as 'x'.op_zeros_like
Optimizer that implements the Adadelta algorithm.optimizer_adadelta
Optimizer that implements the Adafactor algorithm.optimizer_adafactor
Optimizer that implements the Adagrad algorithm.optimizer_adagrad
Optimizer that implements the Adam algorithm.optimizer_adam
Optimizer that implements the AdamW algorithm.optimizer_adam_w
Optimizer that implements the Adamax algorithm.optimizer_adamax
Optimizer that implements the FTRL algorithm.optimizer_ftrl
Optimizer that implements the Lion algorithm.optimizer_lion
An optimizer that dynamically scales the loss to prevent underflow.optimizer_loss_scale
Optimizer that implements the Nadam algorithm.optimizer_nadam
Optimizer that implements the RMSprop algorithm.optimizer_rmsprop
Gradient descent (with momentum) optimizer.optimizer_sgd
Pads sequences to the same length.pad_sequences
Plot training historyplot.keras_training_history
Plot a Keras modelplot.keras.src.models.model.Model
Remove the last layer in a Sequential modelpop_layer
Returns predictions for a single batch of samples.predict_on_batch
Generates output predictions for the input samples.predict.keras.src.models.model.Model
Preprocessing and postprocessing utilitiesapplication_decode_predictions application_preprocess_inputs process_utils
Quantize the weights of a model.quantize_weights
Draw samples from a Beta distribution.random_beta
Draw samples from a Binomial distribution.random_binomial
Draws samples from a categorical distribution.random_categorical
Randomly set some values in a tensor to 0.random_dropout
Draw random samples from the Gamma distribution.random_gamma
Draw random integers from a uniform distribution.random_integer
Draw random samples from a normal (Gaussian) distribution.random_normal
Generates variable seeds upon each call to a RNG-using function.random_seed_generator
Shuffle the elements of a tensor uniformly at random along an axis.random_shuffle
Draw samples from a truncated normal distribution.random_truncated_normal
Draw samples from a uniform distribution.random_uniform
Registers a custom object with the Keras serialization framework.register_keras_serializable
A regularizer that applies a L1 regularization penalty.regularizer_l1
A regularizer that applies both L1 and L2 regularization penalties.regularizer_l1_l2
A regularizer that applies a L2 regularization penalty.regularizer_l2
Regularizer that encourages input vectors to be orthogonal to each other.regularizer_orthogonal
Reset the state for a model, layer or metric.reset_state
Cell class for the GRU layer.rnn_cell_gru
Cell class for the LSTM layer.rnn_cell_lstm
Cell class for SimpleRNN.rnn_cell_simple
Wrapper allowing a stack of RNN cells to behave as a single cell.rnn_cells_stack
Saves a model as a '.keras' file.save_model
Save and load model configuration as JSONload_model_config save_model_config
Saves all layer weights to a '.weights.h5' file.save_model_weights
Retrieve the full config by serializing the Keras object.serialize_keras_object
Sets all random seeds (Python, NumPy, and backend framework, e.g. TF).set_random_seed
Tensor shape utilityas.integer.keras_shape as.list.keras_shape format.keras_shape print.keras_shape shape [.keras_shape
Splits a dataset into a left half and a right half (e.g. train / test).split_dataset
Print a summary of a Keras Modelformat.keras.src.models.model.Model print.keras.src.models.model.Model summary.keras.src.models.model.Model
Test the model on a single batch of samples.test_on_batch
Generates a 'tf.data.Dataset' from text files in a directory.text_dataset_from_directory
Creates a dataset of sliding windows over a timeseries provided as array.timeseries_dataset_from_array
Converts a class vector (integers) to binary class matrix.to_categorical
Runs a single gradient update on a single batch of data.train_on_batch
Configure a Keras backenduse_backend
Provide a scope with mappings of names to custom objectswith_custom_object_scope
Zip listszip_lists