[1] Xianzhi Du, Tsung-Yi Lin, Pengchong Jin, Golnaz Ghiasi, Mingxing Tan,
Yin Cui, Quoc V. Le, Xiaodan Song.
SpineNet
Learning Scale-Permuted Backbone for Recognition and Localization.
(https://arxiv.org/abs/1912.05027).
[2] Xianzhi Du, Tsung-Yi Lin, Pengchong Jin, Yin Cui, Mingxing Tan,
Quoc Le, Xiaodan Song.
Efficient Scale-Permuted Backbone with Learned Resource Distribution.
(https://arxiv.org/abs/2010.11426).
Args
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
The block specifications for the SpineNet model discovered by
NAS.
endpoints_num_filters
An int of feature dimension for the output
endpoints.
se_ratio
A float of Squeeze-and-Excitation ratio.
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.
expand_ratio
An integer of expansion ratios for inverted bottleneck
blocks.
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.
use_keras_upsampling_2d
If True, use keras UpSampling2D layer.
**kwargs
Additional keyword arguments to be passed.
Attributes
output_specs
A dict of {level: TensorShape} pairs for the model output.
Methods
call
call(inputs,training=None,mask=None)
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.