tfm.vision.backbones.SpineNet

Creates a SpineNet family model.

This implements:

Xianzhi Du, Tsung-Yi Lin, Pengchong Jin, Golnaz Ghiasi, Mingxing Tan, Yin Cui, Quoc V. Le, Xiaodan Song.

input_specs A tf.keras.layers.InputSpec of the input tensor.
min_level An int of min level for output mutiscale features.
max_level An int of max level for output mutiscale features.
block_specs A list of block specifications for the SpineNet model discovered by NAS.
endpoints_num_filters An int of feature dimension for the output endpoints.
resample_alpha A float of resampling factor in cross-scale connections.
block_repeats An int of number of blocks contained in the layer.
filter_size_scale A float of multiplier for the filters (number of channels) for all convolution ops. The value must be greater than zero. Typical usage will be to set this value in (0, 1) to reduce the number of parameters or computation cost of the model.
init_stochastic_depth_rate A float of initial stochastic depth rate.
kernel_initializer A str for kernel initializer of convolutional layers.
kernel_regularizer A tf.keras.regularizers.Regularizer object for Conv2D. Default to None.
bias_regularizer A tf.keras.regularizers.Regularizer object for Conv2D. Default to None.
activation A str name of the activation function.
use_sync_bn If True, use synchronized batch normalization.
norm_momentum A float of normalization momentum for the moving average.
norm_epsilon A small float added to variance to avoid dividing by zero.
**kwargs Additional keyword arguments to be passed.

output_specs A dict of {level: TensorShape} pairs for the model output.

Methods

call

Calls the model on new inputs and returns the outputs as tensors.

In this case call() just reapplies all ops in the graph to the new inputs (e.g. build a new computational graph from the provided inputs).

Args
inputs Input tensor, or dict/list/tuple of input tensors.
training Boolean or boolean scalar tensor, indicating whether to run the Network in training mode or inference mode.
mask A mask or list of masks. A mask can be either a boolean tensor or None (no mask). For more details, check the guide here.

Returns
A tensor if there is a single output, or a list of tensors if there are more than one outputs.