R Interface to 'Keras'
Returns the natural logarithm of one plus the x
, element-wise.
Base-2 logarithm of x
, element-wise.
Logarithm of the sum of exponentiations of the inputs.
Computes log of the determinant of a hermitian positive definite matri...
Computes the element-wise logical AND of the given input tensors.
Computes the element-wise NOT of the given input tensor.
Computes the element-wise logical OR of the given input tensors.
Compute the truth value of x1 XOR x2
, element-wise.
Returns numbers spaced evenly on a log scale.
Computes the logarithm of sum of exponentials of elements in a tensor.
Return the least-squares solution to a linear matrix equation.
Computes the lower-upper decomposition of a square matrix.
Map a function over leading array axes.
Matrix product of two tensors.
Max pooling operation.
Return the maximum of a tensor or maximum along an axis.
Element-wise maximum of x1
and x2
.
Compute the arithmetic mean along the specified axes.
Compute the median along the specified axis.
Creates grids of coordinates from coordinate vectors.
Return the minimum of a tensor or minimum along an axis.
Element-wise minimum of x1
and x2
.
Returns the element-wise remainder of division.
Calculates the mean and variance of x
.
Move axes of a tensor to new positions.
Encodes integer labels as multi-hot vectors.
Multiply arguments element-wise.
Replace NaN with zero and infinity with large finite numbers.
Return the number of dimensions of a tensor.
Numerical negative, element-wise.
Return the indices of the elements that are non-zero.
Matrix or vector norm.
Normalizes x
over the specified axis.
Return (x1 != x2)
element-wise.
Converts integer tensor x
into a one-hot tensor.
Return a tensor of ones with the same shape and type of x
.
Return a new tensor of given shape and type, filled with ones.
Compute the outer product of two vectors.
Pad a tensor.
Constructs a complex tensor whose elements are Cartesian
First tensor elements raised to powers from second tensor, element-wis...
Return the product of tensor elements over a given axis.
Peak Signal-to-Noise Ratio (PSNR) function.
Computes the QR decomposition of a tensor.
Compute the q-th quantile(s) of the data along the specified axis.
Return a contiguous flattened tensor.
Return the real part of the complex argument.
Rearranges the axes of a Keras tensor according to a specified pattern...
Return the reciprocal of the argument, element-wise.
Rectified linear unit activation function.
Rectified linear unit activation function with upper bound of 6.
Repeat each element of a tensor after themselves.
Gives a new shape to a tensor without changing its data.
Real-valued Fast Fourier Transform along the last axis of the input.
Shift the bits of an integer to the right.
Performs Root Mean Square (RMS) normalization on x
.
Roll tensor elements along a given axis.
Rotate an array by 90 degrees in the plane specified by axes.
Evenly round to the given number of decimals.
Computes reciprocal of square root of x element-wise.
Performs a safe saturating cast to the desired dtype.
Scan a function over leading array axes while carrying along state.
Update inputs via updates at scattered (sparse) indices.
Returns a tensor of shape shape
where indices
are set to values
.
Perform a binary search
Computes the max of segments in a tensor.
Computes the sum of segments in a tensor.
Return elements from choicelist
, based on conditions in condlist
.
Scaled Exponential Linear Unit (SELU) activation function.
General N-D separable convolution.
Gets the shape of the tensor input.
Sigmoid activation function.
Returns a tensor with the signs of the elements of x
.
Return the sign bit of the elements of x
.
Sigmoid Linear Unit (SiLU) activation function, also known as Swish.
Trigonometric sine, element-wise.
Hyperbolic sine, element-wise.
Return the number of elements in a tensor.
Update an input by slicing in a tensor of updated values.
Return a slice of an input tensor.
Compute the sign and natural logarithm of the determinant of a matrix.
Soft Shrink activation function.
Softmax activation function.
Softplus activation function.
Softsign activation function.
Solves a linear system of equations given by a %*% x = b
.
Solves a linear system of equations given by a x = b
.
Sorts the elements of x
along a given axis in ascending order.
Computes sparse categorical cross-entropy loss.
SparsePlus activation function.
Sparsemax activation function.
Split a tensor into chunks.
Return the non-negative square root of a tensor, element-wise.
Return the element-wise square of the input.
Squareplus activation function.
Remove axes of length one from x
.
Join a sequence of tensors along a new axis.
Compute the standard deviation along the specified axis.
Short-Time Fourier Transform along the last axis of the input.
Stops gradient computation.
Subset elements from a tensor
Subtract arguments element-wise.
Sum of a tensor over the given axes.
Computes the singular value decomposition of a matrix.
Interchange two axes of a tensor.
Apply exactly one of the branches
given by index
.
Select values from x
at the 1-D indices
along the given axis.
Take elements from a tensor along an axis.
Compute tangent, element-wise.
Applies the tanh shrink function element-wise.
Hyperbolic tangent, element-wise.
Compute the tensor dot product along specified axes.
Threshold activation function.
Repeat x
the number of times given by repeats
.
Finds the top-k values and their indices in a tensor.
Return the sum along diagonals of the tensor.
Returns a tensor with axes
transposed.
Return a tensor with ones at and below a diagonal and zeros elsewhere.
Return lower triangle of a tensor.
Return upper triangle of a tensor.
Return the truncated value of the input, element-wise.
Convert flat indices to coordinate arrays in a given array shape.
Unpacks the given dimension of a rank-R tensor into rank-(R-1) tensors...
Compute the variance along the specified axes.
Return the dot product of two vectors.
Turn a function into a vectorized function.
Parallel map of function f
on the first axis of tensor(s) elements
...
Stack tensors in sequence vertically (row wise).
Return elements chosen from x1
or x2
depending on condition
.
While loop implementation.
Return a tensor of zeros with the same shape and type as x
.
Return a new tensor of given shape and type, filled with zeros.
Optimizer that implements the Adadelta algorithm.
Optimizer that implements the Adafactor algorithm.
Optimizer that implements the Adagrad algorithm.
Optimizer that implements the AdamW algorithm.
Optimizer that implements the Adam algorithm.
Optimizer that implements the Adamax algorithm.
Optimizer that implements the FTRL algorithm.
Optimizer that implements the Lamb algorithm.
Optimizer that implements the Lion algorithm.
An optimizer that dynamically scales the loss to prevent underflow.
Optimizer that implements the Nadam algorithm.
Optimizer that implements the RMSprop algorithm.
Gradient descent (with momentum) optimizer.
Pads sequences to the same length.
Pipe operator
Plot training history
Plot a Keras model
Remove the last layer in a Sequential model
Returns predictions for a single batch of samples.
Generates output predictions for the input samples.
Preprocessing and postprocessing utilities
Quantize the weights of a model.
Draw samples from a Beta distribution.
Draw samples from a Binomial distribution.
Draws samples from a categorical distribution.
Randomly set some values in a tensor to 0.
Draw random samples from the Gamma distribution.
Draw random integers from a uniform distribution.
Draw random samples from a normal (Gaussian) distribution.
Generates variable seeds upon each call to a function generating rando...
Shuffle the elements of a tensor uniformly at random along an axis.
Draw samples from a truncated normal distribution.
Draw samples from a uniform distribution.
Objects exported from other packages
Registers a custom object with the Keras serialization framework.
A regularizer that applies both L1 and L2 regularization penalties.
A regularizer that applies a L1 regularization penalty.
A regularizer that applies a L2 regularization penalty.
Regularizer that encourages input vectors to be orthogonal to each oth...
Reset the state for a model, layer or metric.
Cell class for the GRU layer.
Cell class for the LSTM layer.
Cell class for SimpleRNN.
Wrapper allowing a stack of RNN cells to behave as a single cell.
Save and load model configuration as JSON
Saves all layer weights to a .weights.h5
file.
Saves a model as a .keras
file.
Retrieve the full config by serializing the Keras object.
Sets all random seeds (Python, NumPy, and backend framework, e.g. TF).
Assigns values to variables of the model.
Tensor shape utility
Splits a dataset into a left half and a right half (e.g. train / test)...
Continuously Differentiable Exponential Linear Unit.
Exponential Linear Unit.
Exponential activation function.
Gaussian error linear unit (GELU) activation function.
Gated Linear Unit (GLU) activation function.
Hard Shrink activation function.
Hard sigmoid activation function.
Hard SiLU activation function, also known as Hard Swish.
HardTanh activation function.
Leaky relu activation function.
Linear activation function (pass-through).
Logarithm of the sigmoid activation function.
Log-Softmax activation function.
Mish activation function.
Applies the rectified linear unit activation function.
Relu6 activation function.
Scaled Exponential Linear Unit (SELU).
Sigmoid activation function.
Swish (or Silu) activation function.
Soft Shrink activation function.
Softmax converts a vector of values to a probability distribution.
Softplus activation function.
Softsign activation function.
SparsePlus activation function.
Sparsemax activation function.
Squareplus activation function.
Tanh shrink activation function.
Hyperbolic tangent activation function.
Threshold activation function.
Create an active property class method
Print a summary of a Keras Model
Fits the state of the preprocessing layer to the data being passed
Instantiates the ConvNeXtBase architecture.
Instantiates the ConvNeXtLarge architecture.
Instantiates the ConvNeXtSmall architecture.
Instantiates the ConvNeXtTiny architecture.
Instantiates the ConvNeXtXLarge architecture.
Instantiates the Densenet121 architecture.
Instantiates the Densenet169 architecture.
Instantiates the Densenet201 architecture.
Instantiates the EfficientNetB0 architecture.
Instantiates the EfficientNetB1 architecture.
Instantiates the EfficientNetB2 architecture.
Instantiates the EfficientNetB3 architecture.
Instantiates the EfficientNetB4 architecture.
Instantiates the EfficientNetB5 architecture.
Test the model on a single batch of samples.
Instantiates the EfficientNetB6 architecture.
Instantiates the EfficientNetB7 architecture.
Instantiates the EfficientNetV2B0 architecture.
Instantiates the EfficientNetV2B1 architecture.
Instantiates the EfficientNetV2B2 architecture.
Generates a tf.data.Dataset
from text files in a directory.
layer_time_distributed
Creates a dataset of sliding windows over a timeseries provided as arr...
Instantiates the EfficientNetV2B3 architecture.
Instantiates the EfficientNetV2L architecture.
Instantiates the EfficientNetV2M architecture.
Instantiates the EfficientNetV2S architecture.
Instantiates the Inception-ResNet v2 architecture.
Instantiates the Inception v3 architecture.
Instantiates the MobileNetV2 architecture.
Instantiates the MobileNetV3Large architecture.
Instantiates the MobileNetV3Small architecture.
Instantiates the MobileNet architecture.
Instantiates a NASNet model in ImageNet mode.
Instantiates a Mobile NASNet model in ImageNet mode.
Instantiates the ResNet101V2 architecture.
Instantiates the ResNet101 architecture.
Instantiates the ResNet152V2 architecture.
Instantiates the ResNet152 architecture.
Instantiates the ResNet50V2 architecture.
Instantiates the ResNet50 architecture.
Instantiates the VGG16 model.
Instantiates the VGG19 model.
Instantiates the Xception architecture.
Generates a tf.data.Dataset
from audio files in a directory.
Backward compatibility
layer_bidirectional
Callback to back up and restore the training state.
Callback that streams epoch results to a CSV file.
Stop training when a monitored metric has stopped improving.
Callback for creating simple, custom callbacks on-the-fly.
Learning rate scheduler.
Callback to save the Keras model or model weights at some frequency.
Reduce learning rate when a metric has stopped improving.
Callback used to stream events to a server.
Converts a class vector (integers) to binary class matrix.
Swaps model weights and EMA weights before and after evaluation.
Enable visualizations for TensorBoard.
Callback that terminates training when a NaN loss is encountered.
Define a custom Callback
class
Resets all state generated by Keras.
Clone a Functional or Sequential Model
instance.
Configure a model for training.
Publicly accessible method for determining the current backend.
Disable flash attention.
Turn off interactive logging.
Turn off traceback filtering.
Returns the current default dtype policy object.
Enable flash attention.
Turn on interactive logging.
Turn on traceback filtering.
Disables safe mode globally, allowing deserialization of lambdas.
Return the value of the fuzz factor used in numeric expressions.
Return the default float type, as a string.
Return the default image data format convention.
Checks whether flash attention is globally enabled in Keras.
Check if interactive logging is enabled.
Check if traceback filtering is enabled.
Reload the backend (and the Keras package).
Sets the default dtype policy globally.
Set the value of the fuzz factor used in numeric expressions.
Set the default float dtype.
Set the value of the image data format convention.
MaxNorm weight constraint.
MinMaxNorm weight constraint.
Constrains the weights to be non-negative.
Constrains the weights incident to each hidden unit to have unit norm.
Define a custom Constraint
class
Count the total number of scalars composing the weights.
Custom metric function
Boston housing price regression dataset
Loads the California Housing dataset.
CIFAR10 small image classification
CIFAR100 small image classification
Fashion-MNIST database of fashion articles
IMDB Movie reviews sentiment classification
MNIST database of handwritten digits
Reuters newswire topics classification
Retrieve the object by deserializing the config dict.
Evaluate a Keras Model
Export the model as an artifact for inference.
Train a model for a fixed number of epochs (dataset iterations).
Freeze and unfreeze weights
Layer/Model configuration
Get/set the currently registered custom objects.
Downloads a file from a URL if it not already in the cache.
Retrieves a layer based on either its name (unique) or index.
Returns the name registered to an object within the Keras framework.
Returns the class associated with name
if it is registered with Kera...
Returns the list of input tensors necessary to compute tensor
.
Retrieves tree-like structure of model variables.
Layer/Model weights as R arrays
Make a python class constructor
Make an Active Binding
Saves an image stored as an array to a path or file object.
Generates a tf.data.Dataset
from image files in a directory.
Converts a 3D array to a PIL Image instance.
Loads an image into PIL format.
Resize images to a target size without aspect ratio distortion.
Converts a PIL Image instance to a matrix.
Decodes the prediction of an ImageNet model.
Preprocesses a tensor or array encoding a batch of images.
Initializer that generates tensors with constant values.
The Glorot normal initializer, also called Xavier normal initializer.
The Glorot uniform initializer, also called Xavier uniform initializer...
He normal initializer.
He uniform variance scaling initializer.
Initializer that generates the identity matrix.
Lecun normal initializer.
Lecun uniform initializer.
Initializer that generates tensors initialized to 1.
Initializer that generates an orthogonal matrix.
Random normal initializer.
Random uniform initializer.
Initializer of Conv kernels for Short-term Fourier Transformation (STF...
Initializer that generates a truncated normal distribution.
Initializer that adapts its scale to the shape of its input tensors.
Initializer that generates tensors initialized to 0.
Install Keras
Create a Keras tensor (Functional API input).
Keras Model composed of a linear stack of layers
Keras Model (Functional API)
Represents a backend-agnostic variable in Keras.
Main Keras module
keras3: R Interface to 'Keras'
Applies an Exponential Linear Unit function to an output.
Leaky version of a Rectified Linear Unit activation layer.
Parametric Rectified Linear Unit activation layer.
Rectified Linear Unit activation function layer.
Softmax activation layer.
Applies an activation function to an output.
Layer that applies an update to the cost function based input activity...
Performs elementwise addition operation.
Additive attention layer, a.k.a. Bahdanau-style attention.
Applies Alpha Dropout to the input.
Dot-product attention layer, a.k.a. Luong-style attention.
Performs the AugMix data augmentation technique.
Performs the auto-contrast operation on an image.
Average pooling for temporal data.
Average pooling operation for 2D spatial data.
Average pooling operation for 3D data (spatial or spatio-temporal).
Averages a list of inputs element-wise..
Layer that normalizes its inputs.
Bidirectional wrapper for RNNs.
A preprocessing layer which encodes integer features.
A preprocessing layer which crops images.
Concatenates a list of inputs.
1D transposed convolution layer.
1D convolution layer (e.g. temporal convolution).
2D transposed convolution layer.
2D convolution layer.
3D transposed convolution layer.
3D convolution layer.
1D Convolutional LSTM.
2D Convolutional LSTM.
3D Convolutional LSTM.
Cropping layer for 1D input (e.g. temporal sequence).
Cropping layer for 2D input (e.g. picture).
Cropping layer for 3D data (e.g. spatial or spatio-temporal).
CutMix data augmentation technique.
Just your regular densely-connected NN layer.
1D depthwise convolution layer.
2D depthwise convolution layer.
A preprocessing layer which buckets continuous features by ranges.
Computes element-wise dot product of two tensors.
Applies dropout to the input.
A layer that uses einsum
as the backing computation.
Turns nonnegative integers (indexes) into dense vectors of fixed size.
Preprocessing layer for histogram equalization on image channels.
One-stop utility for preprocessing and encoding structured data.
Flattens the input. Does not affect the batch size.
Keras Layer that wraps a Flax module.
Apply multiplicative 1-centered Gaussian noise.
Apply additive zero-centered Gaussian noise.
Global average pooling operation for temporal data.
Global average pooling operation for 2D data.
Global average pooling operation for 3D data.
Global max pooling operation for temporal data.
Global max pooling operation for 2D data.
Global max pooling operation for 3D data.
Group normalization layer.
Grouped Query Attention layer.
Gated Recurrent Unit - Cho et al. 2014.
A preprocessing layer which crosses features using the "hashing trick"...
A preprocessing layer which hashes and bins categorical features.
Identity layer.
keras_input
A preprocessing layer that maps integers to (possibly encoded) indices...
Keras Layer that wraps a JAX model.
Wraps arbitrary expressions as a Layer
object.
Layer normalization layer (Ba et al., 2016).
Long Short-Term Memory layer - Hochreiter 1997.
Masks a sequence by using a mask value to skip timesteps.
Runs a single gradient update on a single batch of data.
Ensure the maximum number of bounding boxes.
Max pooling operation for 1D temporal data.
Max pooling operation for 2D spatial data.
Max pooling operation for 3D data (spatial or spatio-temporal).
Computes element-wise maximum on a list of inputs.
A preprocessing layer to convert raw audio signals to Mel spectrograms...
Computes elementwise minimum on a list of inputs.
MixUp implements the MixUp data augmentation technique.
Multi Head Attention layer.
Performs elementwise multiplication.
A preprocessing layer that normalizes continuous features.
Permutes the dimensions of the input according to a given pattern.
Applies a series of layers to an input.
RandAugment performs the Rand Augment operation on input images.
A preprocessing layer which randomly adjusts brightness during trainin...
Randomly performs the color degeneration operation on given images.
Randomly apply brightness, contrast, saturation
A preprocessing layer which randomly adjusts contrast during training.
A preprocessing layer which randomly crops images during training.
Random Erasing data augmentation technique.
A preprocessing layer which randomly flips images during training.
Applies random Gaussian blur to images for data augmentation.
Preprocessing layer for random conversion of RGB images to grayscale.
Randomly adjusts the hue on given images.
Preprocessing layer for random inversion of image colors.
A preprocessing layer that applies random perspective transformations.
Reduces the number of bits for each color channel.
A preprocessing layer which randomly rotates images during training.
Randomly adjusts the saturation on given images.
Randomly performs the sharpness operation on given images.
A preprocessing layer that randomly applies shear transformations
A preprocessing layer which randomly translates images during training...
A preprocessing layer which randomly zooms images during training.
Repeats the input n times.
A preprocessing layer which rescales input values to a new range.
Layer that reshapes inputs into the given shape.
A preprocessing layer which resizes images.
Root Mean Square (RMS) Normalization layer.
Base class for recurrent layers
1D separable convolution layer.
2D separable convolution layer.
Fully-connected RNN where the output is to be fed back as the new inpu...
Applies (max_value - pixel + min_value)
for each pixel in the image.
Spatial 1D version of Dropout.
Spatial 2D version of Dropout.
Spatial 3D version of Dropout.
Performs spectral normalization on the weights of a target layer.
Layer to compute the Short-Time Fourier Transform (STFT) on a 1D signa...
A preprocessing layer that maps strings to (possibly encoded) indices.
Performs elementwise subtraction.
A preprocessing layer which maps text features to integer sequences.
Reload a Keras model/layer that was saved via export_savedmodel()
.
This wrapper allows to apply a layer to every temporal slice of an inp...
Torch module wrapper layer.
Unit normalization layer.
Upsampling layer for 1D inputs.
Upsampling layer for 2D inputs.
Upsampling layer for 3D inputs.
Zero-padding layer for 1D input (e.g. temporal sequence).
Zero-padding layer for 2D input (e.g. picture).
Zero-padding layer for 3D data (spatial or spatio-temporal).
Define a custom Layer
class.
A LearningRateSchedule
that uses a cosine decay schedule with restar...
A LearningRateSchedule
that uses a cosine decay with optional warmup...
A LearningRateSchedule
that uses an exponential decay schedule.
A LearningRateSchedule
that uses an inverse time decay schedule.
A LearningRateSchedule
that uses a piecewise constant decay schedule...
A LearningRateSchedule
that uses a polynomial decay schedule.
Define a custom LearningRateSchedule
class
Configure a Keras backend
Load weights from a file saved via save_model_weights()
.
Loads a model saved via save_model()
.
Computes the cross-entropy loss between true labels and predicted labe...
Computes focal cross-entropy loss between true labels and predictions.
Computes the crossentropy loss between the labels and predictions.
Provide a scope with mappings of names to custom objects
Computes the alpha balanced focal crossentropy loss.
Computes the categorical hinge loss between y_true
& y_pred
.
Computes Circle Loss between integer labels and L2-normalized embeddin...
Computes the cosine similarity between y_true
& y_pred
.
CTC (Connectionist Temporal Classification) loss.
Zip lists
Computes the Dice loss value between y_true
and y_pred
.
Computes the hinge loss between y_true
& y_pred
.
Computes the Huber loss between y_true
& y_pred
.
Computes Kullback-Leibler divergence loss between y_true
& y_pred
.
Computes the logarithm of the hyperbolic cosine of the prediction erro...
Computes the mean of absolute difference between labels and prediction...
Computes the mean absolute percentage error between y_true
and `y_pr...
Computes the mean of squares of errors between labels and predictions.
Computes the mean squared logarithmic error between y_true
and `y_pr...
Computes the Poisson loss between y_true
& y_pred
.
Computes the crossentropy loss between the labels and predictions.
Computes the squared hinge loss between y_true
& y_pred
.
Computes the Tversky loss value between y_true
and y_pred
.
Subclass the base Loss
class
active_property
Approximates the AUC (Area under the curve) of the ROC or PR curves.
Calculates how often predictions match binary labels.
Computes the crossentropy metric between the labels and predictions.
Computes the binary focal crossentropy loss.
Computes the Intersection-Over-Union metric for class 0 and/or 1.
Calculates how often predictions match one-hot labels.
Computes the crossentropy metric between the labels and predictions.
Computes the categorical focal crossentropy loss.
Computes the categorical hinge metric between y_true
and y_pred
.
Calculates the Concordance Correlation Coefficient (CCC).
Computes the cosine similarity between the labels and predictions.
Computes F-1 Score.
Calculates the number of false negatives.
Calculates the number of false positives.
Computes F-Beta score.
Computes the hinge metric between y_true
and y_pred
.
Computes Huber loss value.
Computes the Intersection-Over-Union metric for specific target classe...
Computes Kullback-Leibler divergence metric between y_true
and
Computes the logarithm of the hyperbolic cosine of the prediction erro...
Logarithm of the hyperbolic cosine of the prediction error.
Computes the mean absolute error between the labels and predictions.
Computes mean absolute percentage error between y_true
and y_pred
.
Computes the mean Intersection-Over-Union metric.
Computes the mean squared error between y_true
and y_pred
.
Computes mean squared logarithmic error between y_true
and y_pred
.
Wrap a stateless metric function with the Mean
metric.
Compute the (weighted) mean of the given values.
Computes the Intersection-Over-Union metric for one-hot encoded labels...
Computes mean Intersection-Over-Union metric for one-hot encoded label...
Calculates the Pearson Correlation Coefficient (PCC).
Computes the Poisson metric between y_true
and y_pred
.
Computes best precision where recall is >= specified value.
Computes the precision of the predictions with respect to the labels.
Computes R2 score.
Computes best recall where precision is >= specified value.
Computes the recall of the predictions with respect to the labels.
Computes root mean squared error metric between y_true
and y_pred
.
Computes best sensitivity where specificity is >= specified value.
Calculates how often predictions match integer labels.
Computes the crossentropy metric between the labels and predictions.
Computes how often integer targets are in the top K
predictions.
Computes best specificity where sensitivity is >= specified value.
Computes the hinge metric between y_true
and y_pred
.
Compute the (weighted) sum of the given values.
Computes how often targets are in the top K
predictions.
Calculates the number of true negatives.
Calculates the number of true positives.
Subclass the base Metric
class
Subclass the base Keras Model
Class
Assign values to names
Callback
Layer
LearningRateSchedule
Loss
Metric
Model
New axis
Normalizes an array.
Compute the absolute value element-wise.
Add arguments element-wise.
Test whether all array elements along a given axis evaluate to TRUE
.
Test whether any array element along a given axis evaluates to TRUE
.
Append tensor x2
to the end of tensor x1
.
Return evenly spaced values within a given interval.
Trigonometric inverse cosine, element-wise.
Inverse hyperbolic cosine, element-wise.
Inverse sine, element-wise.
Inverse hyperbolic sine, element-wise.
Trigonometric inverse tangent, element-wise.
Element-wise arc tangent of x1/x2
choosing the quadrant correctly.
Inverse hyperbolic tangent, element-wise.
Returns the indices of the maximum values along an axis.
Returns the indices of the minimum values along an axis.
Performs an indirect partition along the given axis.
Returns the indices that would sort a tensor.
Create a tensor.
Performs a scan with an associative binary operation, in parallel.
Average pooling operation.
Compute the weighted average along the specified axis.
Normalizes x
by mean
and variance
.
Computes binary cross-entropy loss between target and output tensor.
Count the number of occurrences of each value in a tensor of integers.
Compute the bit-wise AND of two arrays element-wise.
Compute bit-wise inversion, or bit-wise NOT, element-wise.
Shift the bits of an integer to the left.
Compute bit-wise inversion, or bit-wise NOT, element-wise.
Compute the bit-wise OR of two arrays element-wise.
Shift the bits of an integer to the right.
Compute the bit-wise XOR of two arrays element-wise.
Broadcast a tensor to a new shape.
Cast a tensor to the desired dtype.
Computes categorical cross-entropy loss between target and output tens...
Return the ceiling of the input, element-wise.
Continuously-differentiable exponential linear unit.
Computes the Cholesky decomposition of a positive semi-definite matrix...
Clip (limit) the values in a tensor.
Join a sequence of tensors along an existing axis.
Conditionally applies true_fn
or false_fn
.
Returns the complex conjugate, element-wise.
General N-D convolution transpose.
General N-D convolution.
Convert a tensor to an R or NumPy array.
Convert an array to a tensor.
Returns a copy of x
.
Compute the cross-correlation of two 1-dimensional tensors.
Cosine, element-wise.
Hyperbolic cosine, element-wise.
Counts the number of non-zero values in x
along the given axis
.
Returns the cross product of two (arrays of) vectors.
Decodes the output of a CTC model.
CTC (Connectionist Temporal Classification) loss.
Return the cumulative product of elements along a given axis.
Returns the cumulative sum of elements along a given axis.
Decorator to define a function with a custom gradient.
General N-D depthwise convolution.
Computes the determinant of a square tensor.
Extract a diagonal or construct a diagonal array.
Create a two-dimensional array with the flattened input diagonal.
Return specified diagonals.
Calculate the n-th discrete difference along the given axis.
Returns the indices of the bins to which each value in x
belongs.
Safe element-wise division which returns 0 where the denominator is 0.
Divide arguments element-wise.
Scaled dot product attention function.
Dot product of two tensors.
Return the dtype of the tensor input as a standardized string.
Computes the eigenvalues and eigenvectors of a square matrix.
Computes the eigenvalues and eigenvectors of a complex Hermitian.
Evaluates the Einstein summation convention on the operands.
Exponential Linear Unit activation function.
Return a tensor of given shape and type filled with uninitialized data...
Returns (x1 == x2)
element-wise.
Computes the error function of x
, element-wise.
Computes the inverse error function of x
, element-wise.
Calculate the exponential of all elements in the input tensor.
Calculate the base-2 exponential of all elements in the input tensor.
Expand the shape of a tensor.
Calculate exp(x) - 1
for all elements in the tensor.
Expands the dimension of last axis into sequences of sequence_length
...
Return a 2-D tensor with ones on the diagonal and zeros elsewhere.
Computes the Fast Fourier Transform along last axis of input.
Computes the 2D Fast Fourier Transform along the last two axes of inpu...
Reverse the order of elements in the tensor along the given axis.
Returns the largest integer smaller or equal to the division of inputs...
Return the floor of the input, element-wise.
For loop implementation.
Return a full tensor with the same shape and type as the given tensor.
Return a new tensor of given shape and type, filled with fill_value
.
Gaussian Error Linear Unit (GELU) activation function.
Return x[key]
.
Gated Linear Unit (GLU) activation function.
Return the truth value of x1 >= x2
element-wise.
Return the truth value of x1 > x2
element-wise.
Hard Shrink activation function.
Hard sigmoid activation function.
Hard SiLU activation function, also known as Hard Swish.
Applies the HardTanh function element-wise.
Computes a histogram of the data tensor x
.
Stack tensors in sequence horizontally (column wise).
Return the identity tensor.
Computes the 2D Inverse Fast Fourier Transform along the last two axes...
Return the imaginary part of the complex argument.
Applies the given transform(s) to the image(s).
Crop images
to a specified height
and width
.
Extracts patches from the image(s).
Applies a Gaussian blur to the image(s).
Convert HSV images to RGB.
Map the input array to new coordinates by interpolation.
Pad images
with zeros to the specified height
and width
.
Applies a perspective transformation to the image(s).
Resize images to size using the specified interpolation method.
Convert RGB images to grayscale.
Convert RGB images to HSV.
Checks if the targets are in the top-k predictions.
Return the inner product of two tensors.
Computes the inverse of a square tensor.
Inverse real-valued Fast Fourier transform along the last axis.
Check whether the given object is a tensor.
Return whether two tensors are element-wise almost equal.
Return whether a tensor is finite, element-wise.
Test element-wise for positive or negative infinity.
Test element-wise for NaN and return result as a boolean tensor.
Inverse Short-Time Fourier Transform along the last axis of the input.
Leaky version of a Rectified Linear Unit activation function.
Shift the bits of an integer to the left.
Return the truth value of x1 <= x2
element-wise.
Return the truth value of x1 < x2
element-wise.
Return evenly spaced numbers over a specified interval.
Logarithm of the sigmoid activation function.
Log-softmax activation function.
Natural logarithm, element-wise.
Return the base 10 logarithm of the input tensor, element-wise.
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.
Useful links