Man pages for rstudio/keras
R Interface to 'Keras'

activation_eluExponential Linear Unit.
activation_exponentialExponential activation function.
activation_geluGaussian error linear unit (GELU) activation function.
activation_hard_sigmoidHard sigmoid activation function.
activation_hard_siluHard SiLU activation function, also known as Hard Swish.
activation_leaky_reluLeaky relu activation function.
activation_linearLinear activation function (pass-through).
activation_log_softmaxLog-Softmax activation function.
activation_mishMish activation function.
activation_reluApplies the rectified linear unit activation function.
activation_relu6Relu6 activation function.
activation_seluScaled Exponential Linear Unit (SELU).
activation_sigmoidSigmoid activation function.
activation_siluSwish (or Silu) activation function.
activation_softmaxSoftmax converts a vector of values to a probability...
activation_softplusSoftplus activation function.
activation_softsignSoftsign activation function.
activation_tanhHyperbolic tangent activation function.
active_propertyCreate an active property class method
adaptFits the state of the preprocessing layer to the data being...
application_convnext_baseInstantiates the ConvNeXtBase architecture.
application_convnext_largeInstantiates the ConvNeXtLarge architecture.
application_convnext_smallInstantiates the ConvNeXtSmall architecture.
application_convnext_tinyInstantiates the ConvNeXtTiny architecture.
application_convnext_xlargeInstantiates the ConvNeXtXLarge architecture.
application_densenet121Instantiates the Densenet121 architecture.
application_densenet169Instantiates the Densenet169 architecture.
application_densenet201Instantiates the Densenet201 architecture.
application_efficientnet_b0Instantiates the EfficientNetB0 architecture.
application_efficientnet_b1Instantiates the EfficientNetB1 architecture.
application_efficientnet_b2Instantiates the EfficientNetB2 architecture.
application_efficientnet_b3Instantiates the EfficientNetB3 architecture.
application_efficientnet_b4Instantiates the EfficientNetB4 architecture.
application_efficientnet_b5Instantiates the EfficientNetB5 architecture.
application_efficientnet_b6Instantiates the EfficientNetB6 architecture.
application_efficientnet_b7Instantiates the EfficientNetB7 architecture.
application_efficientnet_v2b0Instantiates the EfficientNetV2B0 architecture.
application_efficientnet_v2b1Instantiates the EfficientNetV2B1 architecture.
application_efficientnet_v2b2Instantiates the EfficientNetV2B2 architecture.
application_efficientnet_v2b3Instantiates the EfficientNetV2B3 architecture.
application_efficientnet_v2lInstantiates the EfficientNetV2L architecture.
application_efficientnet_v2mInstantiates the EfficientNetV2M architecture.
application_efficientnet_v2sInstantiates the EfficientNetV2S architecture.
application_inception_resnet_v2Instantiates the Inception-ResNet v2 architecture.
application_inception_v3Instantiates the Inception v3 architecture.
application_mobilenetInstantiates the MobileNet architecture.
application_mobilenet_v2Instantiates the MobileNetV2 architecture.
application_mobilenet_v3_largeInstantiates the MobileNetV3Large architecture.
application_mobilenet_v3_smallInstantiates the MobileNetV3Small architecture.
application_nasnet_largeInstantiates a NASNet model in ImageNet mode.
application_nasnet_mobileInstantiates a Mobile NASNet model in ImageNet mode.
application_resnet101Instantiates the ResNet101 architecture.
application_resnet101_v2Instantiates the ResNet101V2 architecture.
application_resnet152Instantiates the ResNet152 architecture.
application_resnet152_v2Instantiates the ResNet152V2 architecture.
application_resnet50Instantiates the ResNet50 architecture.
application_resnet50_v2Instantiates the ResNet50V2 architecture.
application_vgg16Instantiates the VGG16 model.
application_vgg19Instantiates the VGG19 model.
application_xceptionInstantiates the Xception architecture.
audio_dataset_from_directoryGenerates a 'tf.data.Dataset' from audio files in a...
back-compatBackward compatibility
bidirectionallayer_bidirectional
CallbackDefine a custom 'Callback' class
callback_backup_and_restoreCallback to back up and restore the training state.
callback_csv_loggerCallback that streams epoch results to a CSV file.
callback_early_stoppingStop training when a monitored metric has stopped improving.
callback_lambdaCallback for creating simple, custom callbacks on-the-fly.
callback_learning_rate_schedulerLearning rate scheduler.
callback_model_checkpointCallback to save the Keras model or model weights at some...
callback_reduce_lr_on_plateauReduce learning rate when a metric has stopped improving.
callback_remote_monitorCallback used to stream events to a server.
callback_swap_ema_weightsSwaps model weights and EMA weights before and after...
callback_tensorboardEnable visualizations for TensorBoard.
callback_terminate_on_nanCallback that terminates training when a NaN loss is...
clear_sessionResets all state generated by Keras.
clone_modelClone a Functional or Sequential 'Model' instance.
compile.keras.src.models.model.ModelConfigure a model for training.
config_backendPublicly accessible method for determining the current...
config_disable_interactive_loggingTurn off interactive logging.
config_disable_traceback_filteringTurn off traceback filtering.
config_dtype_policyReturns the current default dtype policy object.
config_enable_interactive_loggingTurn on interactive logging.
config_enable_traceback_filteringTurn on traceback filtering.
config_enable_unsafe_deserializationDisables safe mode globally, allowing deserialization of...
config_epsilonReturn the value of the fuzz factor used in numeric...
config_floatxReturn the default float type, as a string.
config_image_data_formatReturn the default image data format convention.
config_is_interactive_logging_enabledCheck if interactive logging is enabled.
config_is_traceback_filtering_enabledCheck if traceback filtering is enabled.
config_set_backendReload the backend (and the Keras package).
config_set_dtype_policySets the default dtype policy globally.
config_set_epsilonSet the value of the fuzz factor used in numeric expressions.
config_set_floatxSet the default float dtype.
config_set_image_data_formatSet the value of the image data format convention.
ConstraintDefine a custom 'Constraint' class
constraint_maxnormMaxNorm weight constraint.
constraint_minmaxnormMinMaxNorm weight constraint.
constraint_nonnegConstrains the weights to be non-negative.
constraint_unitnormConstrains the weights incident to each hidden unit to have...
count_paramsCount the total number of scalars composing the weights.
custom_metricCustom metric function
dataset_boston_housingBoston housing price regression dataset
dataset_cifar10CIFAR10 small image classification
dataset_cifar100CIFAR100 small image classification
dataset_fashion_mnistFashion-MNIST database of fashion articles
dataset_imdbIMDB Movie reviews sentiment classification
dataset_mnistMNIST database of handwritten digits
dataset_reutersReuters newswire topics classification
deserialize_keras_objectRetrieve the object by deserializing the config dict.
evaluate.keras.src.models.model.ModelEvaluate a Keras Model
export_savedmodel.keras.src.models.model.ModelCreate a TF SavedModel artifact for inference (e.g. via...
fit.keras.src.models.model.ModelTrain a model for a fixed number of epochs (dataset...
freeze_weightsFreeze and unfreeze weights
get_configLayer/Model configuration
get_custom_objectsGet/set the currently registered custom objects.
get_fileDownloads a file from a URL if it not already in the cache.
get_layerRetrieves a layer based on either its name (unique) or index.
get_registered_nameReturns the name registered to an object within the Keras...
get_registered_objectReturns the class associated with 'name' if it is registered...
get_source_inputsReturns the list of input tensors necessary to compute...
get_weightsLayer/Model weights as R arrays
grapes-py_class-grapesMake a python class constructor
grapes-set-active-grapesMake an Active Binding
image_array_saveSaves an image stored as an array to a path or file object.
image_dataset_from_directoryGenerates a 'tf.data.Dataset' from image files in a...
image_from_arrayConverts a 3D array to a PIL Image instance.
image_loadLoads an image into PIL format.
imagenet_decode_predictionsDecodes the prediction of an ImageNet model.
imagenet_preprocess_inputPreprocesses a tensor or array encoding a batch of images.
image_smart_resizeResize images to a target size without aspect ratio...
image_to_arrayConverts a PIL Image instance to a matrix.
initializer_constantInitializer that generates tensors with constant values.
initializer_glorot_normalThe Glorot normal initializer, also called Xavier normal...
initializer_glorot_uniformThe Glorot uniform initializer, also called Xavier uniform...
initializer_he_normalHe normal initializer.
initializer_he_uniformHe uniform variance scaling initializer.
initializer_identityInitializer that generates the identity matrix.
initializer_lecun_normalLecun normal initializer.
initializer_lecun_uniformLecun uniform initializer.
initializer_onesInitializer that generates tensors initialized to 1.
initializer_orthogonalInitializer that generates an orthogonal matrix.
initializer_random_normalRandom normal initializer.
initializer_random_uniformRandom uniform initializer.
initializer_truncated_normalInitializer that generates a truncated normal distribution.
initializer_variance_scalingInitializer that adapts its scale to the shape of its input...
initializer_zerosInitializer that generates tensors initialized to 0.
install_kerasInstall Keras
kerasMain Keras module
keras3-packagekeras3: R Interface to 'Keras'
keras_inputCreate a Keras tensor (Functional API input).
keras_modelKeras Model (Functional API)
keras_model_sequentialKeras Model composed of a linear stack of layers
LayerDefine a custom 'Layer' class.
layer_activationApplies an activation function to an output.
layer_activation_eluApplies an Exponential Linear Unit function to an output.
layer_activation_leaky_reluLeaky version of a Rectified Linear Unit activation layer.
layer_activation_parametric_reluParametric Rectified Linear Unit activation layer.
layer_activation_reluRectified Linear Unit activation function layer.
layer_activation_softmaxSoftmax activation layer.
layer_activity_regularizationLayer that applies an update to the cost function based input...
layer_addPerforms elementwise addition operation.
layer_additive_attentionAdditive attention layer, a.k.a. Bahdanau-style attention.
layer_alpha_dropoutApplies Alpha Dropout to the input.
layer_attentionDot-product attention layer, a.k.a. Luong-style attention.
layer_averageAverages a list of inputs element-wise..
layer_average_pooling_1dAverage pooling for temporal data.
layer_average_pooling_2dAverage pooling operation for 2D spatial data.
layer_average_pooling_3dAverage pooling operation for 3D data (spatial or...
layer_batch_normalizationLayer that normalizes its inputs.
layer_bidirectionalBidirectional wrapper for RNNs.
layer_category_encodingA preprocessing layer which encodes integer features.
layer_center_cropA preprocessing layer which crops images.
layer_concatenateConcatenates a list of inputs.
layer_conv_1d1D convolution layer (e.g. temporal convolution).
layer_conv_1d_transpose1D transposed convolution layer.
layer_conv_2d2D convolution layer.
layer_conv_2d_transpose2D transposed convolution layer.
layer_conv_3d3D convolution layer.
layer_conv_3d_transpose3D transposed convolution layer.
layer_conv_lstm_1d1D Convolutional LSTM.
layer_conv_lstm_2d2D Convolutional LSTM.
layer_conv_lstm_3d3D Convolutional LSTM.
layer_cropping_1dCropping layer for 1D input (e.g. temporal sequence).
layer_cropping_2dCropping layer for 2D input (e.g. picture).
layer_cropping_3dCropping layer for 3D data (e.g. spatial or spatio-temporal).
layer_denseJust your regular densely-connected NN layer.
layer_depthwise_conv_1d1D depthwise convolution layer.
layer_depthwise_conv_2d2D depthwise convolution layer.
layer_discretizationA preprocessing layer which buckets continuous features by...
layer_dotComputes element-wise dot product of two tensors.
layer_dropoutApplies dropout to the input.
layer_einsum_denseA layer that uses 'einsum' as the backing computation.
layer_embeddingTurns positive integers (indexes) into dense vectors of fixed...
layer_feature_spaceOne-stop utility for preprocessing and encoding structured...
layer_flattenFlattens the input. Does not affect the batch size.
layer_flax_module_wrapperKeras Layer that wraps a Flax module.
layer_gaussian_dropoutApply multiplicative 1-centered Gaussian noise.
layer_gaussian_noiseApply additive zero-centered Gaussian noise.
layer_global_average_pooling_1dGlobal average pooling operation for temporal data.
layer_global_average_pooling_2dGlobal average pooling operation for 2D data.
layer_global_average_pooling_3dGlobal average pooling operation for 3D data.
layer_global_max_pooling_1dGlobal max pooling operation for temporal data.
layer_global_max_pooling_2dGlobal max pooling operation for 2D data.
layer_global_max_pooling_3dGlobal max pooling operation for 3D data.
layer_group_normalizationGroup normalization layer.
layer_group_query_attentionGrouped Query Attention layer.
layer_gruGated Recurrent Unit - Cho et al. 2014.
layer_hashed_crossingA preprocessing layer which crosses features using the...
layer_hashingA preprocessing layer which hashes and bins categorical...
layer_identityIdentity layer.
layer_inputkeras_input
layer_integer_lookupA preprocessing layer that maps integers to (possibly...
layer_jax_model_wrapperKeras Layer that wraps a JAX model.
layer_lambdaWraps arbitrary expressions as a 'Layer' object.
layer_layer_normalizationLayer normalization layer (Ba et al., 2016).
layer_lstmLong Short-Term Memory layer - Hochreiter 1997.
layer_maskingMasks a sequence by using a mask value to skip timesteps.
layer_maximumComputes element-wise maximum on a list of inputs.
layer_max_pooling_1dMax pooling operation for 1D temporal data.
layer_max_pooling_2dMax pooling operation for 2D spatial data.
layer_max_pooling_3dMax pooling operation for 3D data (spatial or...
layer_mel_spectrogramA preprocessing layer to convert raw audio signals to Mel...
layer_minimumComputes elementwise minimum on a list of inputs.
layer_multi_head_attentionMulti Head Attention layer.
layer_multiplyPerforms elementwise multiplication.
layer_normalizationA preprocessing layer that normalizes continuous features.
layer_permutePermutes the dimensions of the input according to a given...
layer_random_brightnessA preprocessing layer which randomly adjusts brightness...
layer_random_contrastA preprocessing layer which randomly adjusts contrast during...
layer_random_cropA preprocessing layer which randomly crops images during...
layer_random_flipA preprocessing layer which randomly flips images during...
layer_random_rotationA preprocessing layer which randomly rotates images during...
layer_random_translationA preprocessing layer which randomly translates images during...
layer_random_zoomA preprocessing layer which randomly zooms images during...
layer_repeat_vectorRepeats the input n times.
layer_rescalingA preprocessing layer which rescales input values to a new...
layer_reshapeLayer that reshapes inputs into the given shape.
layer_resizingA preprocessing layer which resizes images.
layer_rnnBase class for recurrent layers
layer_separable_conv_1d1D separable convolution layer.
layer_separable_conv_2d2D separable convolution layer.
layer_simple_rnnFully-connected RNN where the output is to be fed back as the...
layer_spatial_dropout_1dSpatial 1D version of Dropout.
layer_spatial_dropout_2dSpatial 2D version of Dropout.
layer_spatial_dropout_3dSpatial 3D version of Dropout.
layer_spectral_normalizationPerforms spectral normalization on the weights of a target...
layer_string_lookupA preprocessing layer that maps strings to (possibly encoded)...
layer_subtractPerforms elementwise subtraction.
layer_text_vectorizationA preprocessing layer which maps text features to integer...
layer_tfsmReload a Keras model/layer that was saved via...
layer_time_distributedThis wrapper allows to apply a layer to every temporal slice...
layer_torch_module_wrapperTorch module wrapper layer.
layer_unit_normalizationUnit normalization layer.
layer_upsampling_1dUpsampling layer for 1D inputs.
layer_upsampling_2dUpsampling layer for 2D inputs.
layer_upsampling_3dUpsampling layer for 3D inputs.
layer_zero_padding_1dZero-padding layer for 1D input (e.g. temporal sequence).
layer_zero_padding_2dZero-padding layer for 2D input (e.g. picture).
layer_zero_padding_3dZero-padding layer for 3D data (spatial or spatio-temporal).
LearningRateScheduleDefine a custom 'LearningRateSchedule' class
learning_rate_schedule_cosine_decayA 'LearningRateSchedule' that uses a cosine decay with...
learning_rate_schedule_cosine_decay_restartsA 'LearningRateSchedule' that uses a cosine decay schedule...
learning_rate_schedule_exponential_decayA 'LearningRateSchedule' that uses an exponential decay...
learning_rate_schedule_inverse_time_decayA 'LearningRateSchedule' that uses an inverse time decay...
learning_rate_schedule_piecewise_constant_decayA 'LearningRateSchedule' that uses a piecewise constant decay...
learning_rate_schedule_polynomial_decayA 'LearningRateSchedule' that uses a polynomial decay...
load_modelLoads a model saved via 'save_model()'.
load_model_weightsLoad weights from a file saved via 'save_model_weights()'.
LossSubclass the base 'Loss' class
loss_binary_crossentropyComputes the cross-entropy loss between true labels and...
loss_binary_focal_crossentropyComputes focal cross-entropy loss between true labels and...
loss_categorical_crossentropyComputes the crossentropy loss between the labels and...
loss_categorical_focal_crossentropyComputes the alpha balanced focal crossentropy loss.
loss_categorical_hingeComputes the categorical hinge loss between 'y_true' &...
loss_cosine_similarityComputes the cosine similarity between 'y_true' & 'y_pred'.
loss_ctcCTC (Connectionist Temporal Classification) loss.
loss_diceComputes the Dice loss value between 'y_true' and 'y_pred'.
loss_hingeComputes the hinge loss between 'y_true' & 'y_pred'.
loss_huberComputes the Huber loss between 'y_true' & 'y_pred'.
loss_kl_divergenceComputes Kullback-Leibler divergence loss between 'y_true' &...
loss_log_coshComputes the logarithm of the hyperbolic cosine of the...
loss_mean_absolute_errorComputes the mean of absolute difference between labels and...
loss_mean_absolute_percentage_errorComputes the mean absolute percentage error between 'y_true'...
loss_mean_squared_errorComputes the mean of squares of errors between labels and...
loss_mean_squared_logarithmic_errorComputes the mean squared logarithmic error between 'y_true'...
loss_poissonComputes the Poisson loss between 'y_true' & 'y_pred'.
loss_sparse_categorical_crossentropyComputes the crossentropy loss between the labels and...
loss_squared_hingeComputes the squared hinge loss between 'y_true' & 'y_pred'.
loss_tverskyComputes the Tversky loss value between 'y_true' and...
mark_activeactive_property
MetricSubclass the base 'Metric' class
metric_aucApproximates the AUC (Area under the curve) of the ROC or PR...
metric_binary_accuracyCalculates how often predictions match binary labels.
metric_binary_crossentropyComputes the crossentropy metric between the labels and...
metric_binary_focal_crossentropyComputes the binary focal crossentropy loss.
metric_binary_iouComputes the Intersection-Over-Union metric for class 0...
metric_categorical_accuracyCalculates how often predictions match one-hot labels.
metric_categorical_crossentropyComputes the crossentropy metric between the labels and...
metric_categorical_focal_crossentropyComputes the categorical focal crossentropy loss.
metric_categorical_hingeComputes the categorical hinge metric between 'y_true' and...
metric_cosine_similarityComputes the cosine similarity between the labels and...
metric_f1_scoreComputes F-1 Score.
metric_false_negativesCalculates the number of false negatives.
metric_false_positivesCalculates the number of false positives.
metric_fbeta_scoreComputes F-Beta score.
metric_hingeComputes the hinge metric between 'y_true' and 'y_pred'.
metric_huberComputes Huber loss value.
metric_iouComputes the Intersection-Over-Union metric for specific...
metric_kl_divergenceComputes Kullback-Leibler divergence metric between 'y_true'...
metric_log_coshLogarithm of the hyperbolic cosine of the prediction error.
metric_log_cosh_errorComputes the logarithm of the hyperbolic cosine of the...
metric_meanCompute the (weighted) mean of the given values.
metric_mean_absolute_errorComputes the mean absolute error between the labels and...
metric_mean_absolute_percentage_errorComputes mean absolute percentage error between 'y_true' and...
metric_mean_iouComputes the mean Intersection-Over-Union metric.
metric_mean_squared_errorComputes the mean squared error between 'y_true' and...
metric_mean_squared_logarithmic_errorComputes mean squared logarithmic error between 'y_true' and...
metric_mean_wrapperWrap a stateless metric function with the 'Mean' metric.
metric_one_hot_iouComputes the Intersection-Over-Union metric for one-hot...
metric_one_hot_mean_iouComputes mean Intersection-Over-Union metric for one-hot...
metric_poissonComputes the Poisson metric between 'y_true' and 'y_pred'.
metric_precisionComputes the precision of the predictions with respect to the...
metric_precision_at_recallComputes best precision where recall is >= specified value.
metric_r2_scoreComputes R2 score.
metric_recallComputes the recall of the predictions with respect to the...
metric_recall_at_precisionComputes best recall where precision is >= specified value.
metric_root_mean_squared_errorComputes root mean squared error metric between 'y_true' and...
metric_sensitivity_at_specificityComputes best sensitivity where specificity is >= specified...
metric_sparse_categorical_accuracyCalculates how often predictions match integer labels.
metric_sparse_categorical_crossentropyComputes the crossentropy metric between the labels and...
metric_sparse_top_k_categorical_accuracyComputes how often integer targets are in the top 'K'...
metric_specificity_at_sensitivityComputes best specificity where sensitivity is >= specified...
metric_squared_hingeComputes the hinge metric between 'y_true' and 'y_pred'.
metric_sumCompute the (weighted) sum of the given values.
metric_top_k_categorical_accuracyComputes how often targets are in the top 'K' predictions.
metric_true_negativesCalculates the number of true negatives.
metric_true_positivesCalculates the number of true positives.
ModelSubclass the base Keras 'Model' Class
multi-assignAssign values to names
new_callback_classCallback
new_layer_classLayer
new_learning_rate_schedule_classLearningRateSchedule
new_loss_classLoss
new_metric_classMetric
new_model_classModel
normalizeNormalizes an array.
op_absCompute the absolute value element-wise.
op_addAdd arguments element-wise.
op_allTest whether all array elements along a given axis evaluate...
op_anyTest whether any array element along a given axis evaluates...
op_appendAppend tensor 'x2' to the end of tensor 'x1'.
op_arangeReturn evenly spaced values within a given interval.
op_arccosTrigonometric inverse cosine, element-wise.
op_arccoshInverse hyperbolic cosine, element-wise.
op_arcsinInverse sine, element-wise.
op_arcsinhInverse hyperbolic sine, element-wise.
op_arctanTrigonometric inverse tangent, element-wise.
op_arctan2Element-wise arc tangent of 'x1/x2' choosing the quadrant...
op_arctanhInverse hyperbolic tangent, element-wise.
op_argmaxReturns the indices of the maximum values along an axis.
op_argminReturns the indices of the minimum values along an axis.
op_argpartitionPerforms an indirect partition along the given axis.
op_argsortReturns the indices that would sort a tensor.
op_arrayCreate a tensor.
op_averageCompute the weighted average along the specified axis.
op_average_poolAverage pooling operation.
op_batch_normalizationNormalizes 'x' by 'mean' and 'variance'.
op_binary_crossentropyComputes binary cross-entropy loss between target and output...
op_bincountCount the number of occurrences of each value in a tensor of...
op_broadcast_toBroadcast a tensor to a new shape.
op_castCast a tensor to the desired dtype.
op_categorical_crossentropyComputes categorical cross-entropy loss between target and...
op_ceilReturn the ceiling of the input, element-wise.
op_choleskyComputes the Cholesky decomposition of a positive...
op_clipClip (limit) the values in a tensor.
op_concatenateJoin a sequence of tensors along an existing axis.
op_condConditionally applies 'true_fn' or 'false_fn'.
op_conjReturns the complex conjugate, element-wise.
op_convGeneral N-D convolution.
op_convert_to_numpyConvert a tensor to a NumPy array.
op_convert_to_tensorConvert an array to a tensor.
op_conv_transposeGeneral N-D convolution transpose.
op_copyReturns a copy of 'x'.
op_correlateCompute the cross-correlation of two 1-dimensional tensors.
op_cosCosine, element-wise.
op_coshHyperbolic cosine, element-wise.
op_count_nonzeroCounts the number of non-zero values in 'x' along the given...
op_crossReturns the cross product of two (arrays of) vectors.
op_ctc_decodeDecodes the output of a CTC model.
op_ctc_lossCTC (Connectionist Temporal Classification) loss.
op_cumprodReturn the cumulative product of elements along a given axis.
op_cumsumReturns the cumulative sum of elements along a given axis.
op_custom_gradientDecorator to define a function with a custom gradient.
op_depthwise_convGeneral N-D depthwise convolution.
op_detComputes the determinant of a square tensor.
op_diagExtract a diagonal or construct a diagonal array.
op_diagonalReturn specified diagonals.
op_diffCalculate the n-th discrete difference along the given axis.
op_digitizeReturns the indices of the bins to which each value in 'x'...
op_divideDivide arguments element-wise.
op_divide_no_nanSafe element-wise division which returns 0 where the...
op_dotDot product of two tensors.
op_dtypeReturn the dtype of the tensor input as a standardized...
op_eigComputes the eigenvalues and eigenvectors of a square matrix.
op_eighComputes the eigenvalues and eigenvectors of a complex...
op_einsumEvaluates the Einstein summation convention on the operands.
op_eluExponential Linear Unit activation function.
op_emptyReturn a tensor of given shape and type filled with...
op_equalReturns '(x1 == x2)' element-wise.
op_erfComputes the error function of 'x', element-wise.
op_erfinvComputes the inverse error function of 'x', element-wise.
op_expCalculate the exponential of all elements in the input...
op_expand_dimsExpand the shape of a tensor.
op_expm1Calculate 'exp(x) - 1' for all elements in the tensor.
op_extract_sequencesExpands the dimension of last axis into sequences of...
op_eyeReturn a 2-D tensor with ones on the diagonal and zeros...
op_fftComputes the Fast Fourier Transform along last axis of input.
op_fft2Computes the 2D Fast Fourier Transform along the last two...
op_flipReverse the order of elements in the tensor along the given...
op_floorReturn the floor of the input, element-wise.
op_floor_divideReturns the largest integer smaller or equal to the division...
op_fori_loopFor loop implementation.
op_fullReturn a new tensor of given shape and type, filled with...
op_full_likeReturn a full tensor with the same shape and type as the...
op_geluGaussian Error Linear Unit (GELU) activation function.
op_get_itemReturn 'x[key]'.
op_greaterReturn the truth value of 'x1 > x2' element-wise.
op_greater_equalReturn the truth value of 'x1 >= x2' element-wise.
op_hard_sigmoidHard sigmoid activation function.
op_hard_siluHard SiLU activation function, also known as Hard Swish.
op_hstackStack tensors in sequence horizontally (column wise).
op_identityReturn the identity tensor.
op_imagReturn the imaginary part of the complex argument.
op_image_affine_transformApplies the given transform(s) to the image(s).
op_image_cropCrop 'images' to a specified 'height' and 'width'.
op_image_extract_patchesExtracts patches from the image(s).
op_image_hsv_to_rgbConvert HSV images to RGB.
op_image_map_coordinatesMap the input array to new coordinates by interpolation.
op_image_padPad 'images' with zeros to the specified 'height' and...
op_image_resizeResize images to size using the specified interpolation...
op_image_rgb_to_grayscaleConvert RGB images to grayscale.
op_image_rgb_to_hsvConvert RGB images to HSV.
op_in_top_kChecks if the targets are in the top-k predictions.
op_invComputes the inverse of a square tensor.
op_irfftInverse real-valued Fast Fourier transform along the last...
op_iscloseReturn whether two tensors are element-wise almost equal.
op_isfiniteReturn whether a tensor is finite, element-wise.
op_isinfTest element-wise for positive or negative infinity.
op_isnanTest element-wise for NaN and return result as a boolean...
op_is_tensorCheck whether the given object is a tensor.
op_istftInverse Short-Time Fourier Transform along the last axis of...
op_leaky_reluLeaky version of a Rectified Linear Unit activation function.
op_lessReturn the truth value of 'x1 < x2' element-wise.
op_less_equalReturn the truth value of 'x1 <= x2' element-wise.
op_linspaceReturn evenly spaced numbers over a specified interval.
op_logNatural logarithm, element-wise.
op_log10Return the base 10 logarithm of the input tensor,...
op_log1pReturns the natural logarithm of one plus the 'x',...
op_log2Base-2 logarithm of 'x', element-wise.
op_logaddexpLogarithm of the sum of exponentiations of the inputs.
op_logical_andComputes the element-wise logical AND of the given input...
op_logical_notComputes the element-wise NOT of the given input tensor.
op_logical_orComputes the element-wise logical OR of the given input...
op_logical_xorCompute the truth value of x1 XOR x2, element-wise.
op_log_sigmoidLogarithm of the sigmoid activation function.
op_log_softmaxLog-softmax activation function.
op_logspaceReturns numbers spaced evenly on a log scale.
op_logsumexpComputes the logarithm of sum of exponentials of elements in...
op_lstsqReturn the least-squares solution to a linear matrix...
op_lu_factorComputes the lower-upper decomposition of a square matrix.
op_mapMap a function over leading array axes.
op_matmulMatrix product of two tensors.
op_maxReturn the maximum of a tensor or maximum along an axis.
op_maximumElement-wise maximum of 'x1' and 'x2'.
op_max_poolMax pooling operation.
op_meanCompute the arithmetic mean along the specified axes.
op_medianCompute the median along the specified axis.
op_meshgridCreates grids of coordinates from coordinate vectors.
op_minReturn the minimum of a tensor or minimum along an axis.
op_minimumElement-wise minimum of 'x1' and 'x2'.
op_modReturns the element-wise remainder of division.
op_momentsCalculates the mean and variance of 'x'.
op_moveaxisMove axes of a tensor to new positions.
op_multi_hotEncodes integer labels as multi-hot vectors.
op_multiplyMultiply arguments element-wise.
op_nan_to_numReplace NaN with zero and infinity with large finite numbers.
op_ndimReturn the number of dimensions of a tensor.
op_negativeNumerical negative, element-wise.
op_nonzeroReturn the indices of the elements that are non-zero.
op_normMatrix or vector norm.
op_normalizeNormalizes 'x' over the specified axis.
op_not_equalReturn '(x1 != x2)' element-wise.
op_one_hotConverts integer tensor 'x' into a one-hot tensor.
op_onesReturn a new tensor of given shape and type, filled with...
op_ones_likeReturn a tensor of ones with the same shape and type of 'x'.
op_outerCompute the outer product of two vectors.
op_padPad a tensor.
op_powerFirst tensor elements raised to powers from second tensor,...
op_prodReturn the product of tensor elements over a given axis.
op_psnrPeak Signal-to-Noise Ratio (PSNR) function.
op_qrComputes the QR decomposition of a tensor.
op_quantileCompute the q-th quantile(s) of the data along the specified...
op_ravelReturn a contiguous flattened tensor.
op_realReturn the real part of the complex argument.
op_reciprocalReturn the reciprocal of the argument, element-wise.
op_reluRectified linear unit activation function.
op_relu6Rectified linear unit activation function with upper bound of...
op_repeatRepeat each element of a tensor after themselves.
op_reshapeGives a new shape to a tensor without changing its data.
op_rfftReal-valued Fast Fourier Transform along the last axis of the...
op_rollRoll tensor elements along a given axis.
op_roundEvenly round to the given number of decimals.
op_rsqrtComputes reciprocal of square root of x element-wise.
op_scanScan a function over leading array axes while carrying along...
op_scatterReturns a tensor of shape 'shape' where 'indices' are set to...
op_scatter_updateUpdate inputs via updates at scattered (sparse) indices.
op_segment_maxComputes the max of segments in a tensor.
op_segment_sumComputes the sum of segments in a tensor.
op_selectReturn elements from 'choicelist', based on conditions in...
op_seluScaled Exponential Linear Unit (SELU) activation function.
op_separable_convGeneral N-D separable convolution.
op_shapeGets the shape of the tensor input.
op_sigmoidSigmoid activation function.
op_signReturns a tensor with the signs of the elements of 'x'.
op_siluSigmoid Linear Unit (SiLU) activation function, also known as...
op_sinTrigonometric sine, element-wise.
op_sinhHyperbolic sine, element-wise.
op_sizeReturn the number of elements in a tensor.
op_sliceReturn a slice of an input tensor.
op_slice_updateUpdate an input by slicing in a tensor of updated values.
op_slogdetCompute the sign and natural logarithm of the determinant of...
op_softmaxSoftmax activation function.
op_softplusSoftplus activation function.
op_softsignSoftsign activation function.
op_solveSolves a linear system of equations given by a x = b.
op_solve_triangularSolves a linear system of equations given by 'a %*% x = b'.
op_sortSorts the elements of 'x' along a given axis in ascending...
op_sparse_categorical_crossentropyComputes sparse categorical cross-entropy loss.
op_splitSplit a tensor into chunks.
op_sqrtReturn the non-negative square root of a tensor,...
op_squareReturn the element-wise square of the input.
op_squeezeRemove axes of length one from 'x'.
op_stackJoin a sequence of tensors along a new axis.
op_stdCompute the standard deviation along the specified axis.
op_stftShort-Time Fourier Transform along the last axis of the...
op_stop_gradientStops gradient computation.
op_subtractSubtract arguments element-wise.
op_sumSum of a tensor over the given axes.
op_svdComputes the singular value decomposition of a matrix.
op_swapaxesInterchange two axes of a tensor.
op_switchApply exactly one of the 'branches' given by 'index'.
op_takeTake elements from a tensor along an axis.
op_take_along_axisSelect values from 'x' at the 1-D 'indices' along the given...
op_tanCompute tangent, element-wise.
op_tanhHyperbolic tangent, element-wise.
op_tensordotCompute the tensor dot product along specified axes.
op_tileRepeat 'x' the number of times given by 'repeats'.
optimizer_adadeltaOptimizer that implements the Adadelta algorithm.
optimizer_adafactorOptimizer that implements the Adafactor algorithm.
optimizer_adagradOptimizer that implements the Adagrad algorithm.
optimizer_adamOptimizer that implements the Adam algorithm.
optimizer_adamaxOptimizer that implements the Adamax algorithm.
optimizer_adam_wOptimizer that implements the AdamW algorithm.
optimizer_ftrlOptimizer that implements the FTRL algorithm.
optimizer_lionOptimizer that implements the Lion algorithm.
optimizer_loss_scaleAn optimizer that dynamically scales the loss to prevent...
optimizer_nadamOptimizer that implements the Nadam algorithm.
optimizer_rmspropOptimizer that implements the RMSprop algorithm.
optimizer_sgdGradient descent (with momentum) optimizer.
op_top_kFinds the top-k values and their indices in a tensor.
op_traceReturn the sum along diagonals of the tensor.
op_transposeReturns a tensor with 'axes' transposed.
op_triReturn a tensor with ones at and below a diagonal and zeros...
op_trilReturn lower triangle of a tensor.
op_triuReturn upper triangle of a tensor.
op_unstackUnpacks the given dimension of a rank-R tensor into...
op_varCompute the variance along the specified axes.
op_vdotReturn the dot product of two vectors.
op_vectorizeTurn a function into a vectorized function.
op_vectorized_mapParallel map of function 'f' on the first axis of tensor(s)...
op_vstackStack tensors in sequence vertically (row wise).
op_whereReturn elements chosen from 'x1' or 'x2' depending on...
op_while_loopWhile loop implementation.
op_zerosReturn a new tensor of given shape and type, filled with...
op_zeros_likeReturn a tensor of zeros with the same shape and type as 'x'.
pad_sequencesPads sequences to the same length.
pipePipe operator
plot.keras.src.models.model.ModelPlot a Keras model
plot.keras_training_historyPlot training history
pop_layerRemove the last layer in a Sequential model
predict.keras.src.models.model.ModelGenerates output predictions for the input samples.
predict_on_batchReturns predictions for a single batch of samples.
process_utilsPreprocessing and postprocessing utilities
quantize_weightsQuantize the weights of a model.
random_betaDraw samples from a Beta distribution.
random_binomialDraw samples from a Binomial distribution.
random_categoricalDraws samples from a categorical distribution.
random_dropoutRandomly set some values in a tensor to 0.
random_gammaDraw random samples from the Gamma distribution.
random_integerDraw random integers from a uniform distribution.
random_normalDraw random samples from a normal (Gaussian) distribution.
random_seed_generatorGenerates variable seeds upon each call to a RNG-using...
random_shuffleShuffle the elements of a tensor uniformly at random along an...
random_truncated_normalDraw samples from a truncated normal distribution.
random_uniformDraw samples from a uniform distribution.
reexportsObjects exported from other packages
register_keras_serializableRegisters a custom object with the Keras serialization...
regularizer_l1A regularizer that applies a L1 regularization penalty.
regularizer_l1_l2A regularizer that applies both L1 and L2 regularization...
regularizer_l2A regularizer that applies a L2 regularization penalty.
regularizer_orthogonalRegularizer that encourages input vectors to be orthogonal to...
reset_stateReset the state for a model, layer or metric.
rnn_cell_gruCell class for the GRU layer.
rnn_cell_lstmCell class for the LSTM layer.
rnn_cell_simpleCell class for SimpleRNN.
rnn_cells_stackWrapper allowing a stack of RNN cells to behave as a single...
save_modelSaves a model as a '.keras' file.
save_model_configSave and load model configuration as JSON
save_model_weightsSaves all layer weights to a '.weights.h5' file.
serialize_keras_objectRetrieve the full config by serializing the Keras object.
set_random_seedSets all random seeds (Python, NumPy, and backend framework,...
shapeTensor shape utility
split_datasetSplits a dataset into a left half and a right half (e.g....
summary.keras.src.models.model.ModelPrint a summary of a Keras Model
test_on_batchTest the model on a single batch of samples.
text_dataset_from_directoryGenerates a 'tf.data.Dataset' from text files in a directory.
time_distributedlayer_time_distributed
timeseries_dataset_from_arrayCreates a dataset of sliding windows over a timeseries...
to_categoricalConverts a class vector (integers) to binary class matrix.
train_on_batchRuns a single gradient update on a single batch of data.
use_backendConfigure a Keras backend
with_custom_object_scopeProvide a scope with mappings of names to custom objects
zip_listsZip lists
rstudio/keras documentation built on July 8, 2024, 3:07 p.m.