This implements the paper:
Tsung-Yi Lin, Piotr Dollar, Ross Girshick, Kaiming He, Bharath Hariharan, and
Serge Belongie.
Feature Pyramid Networks for Object Detection.
(https://arxiv.org/pdf/1612.03144)
Args
input_specs
A dict of input specifications. A dictionary consists of
{level: TensorShape} from a backbone.
min_level
An int of minimum level in FPN output feature maps.
max_level
An int of maximum level in FPN output feature maps.
num_filters
An int number of filters in FPN layers.
fusion_type
A str of sum or concat. Whether performing sum or
concat for feature fusion.
use_separable_conv
A bool. If True use separable convolution for
convolution in FPN layers.
use_keras_layer
A bool. If Ture use keras layers as many as possible.
activation
A str name of the activation function.
use_sync_bn
A bool. If True, use synchronized batch normalization.
norm_momentum
A float of normalization momentum for the moving average.
norm_epsilon
A float added to variance to avoid dividing by zero.
kernel_initializer
A str name of kernel_initializer for convolutional
layers.
kernel_regularizer
A tf_keras.regularizers.Regularizer object for
Conv2D. Default is None.
bias_regularizer
A tf_keras.regularizers.Regularizer object for Conv2D.
**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.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2026-11-06 UTC."],[],[]]