tfm.vision.factory.build_retinanet
Stay organized with collections
Save and categorize content based on your preferences.
Builds a RetinaNet model.
tfm.vision.factory.build_retinanet(
input_specs: tf_keras.layers.InputSpec,
model_config: tfm.vision.configs.retinanet.RetinaNet,
l2_regularizer: Optional[tf_keras.regularizers.Regularizer] = None,
backbone: Optional[tf_keras.Model] = None,
decoder: Optional[tf_keras.Model] = None,
num_anchors_per_location: (int | dict[str, int] | None) = None,
anchor_boxes: (Mapping[str, tf.Tensor] | None) = None
) -> tf_keras.Model
Args |
input_specs
|
The InputSpec of the input image tensor to the model.
|
model_config
|
The RetinaNet model configuration to build from.
|
l2_regularizer
|
Optional l2 regularizer to use for building the backbone,
decorder, and head.
|
backbone
|
Optional instance of the backbone model.
|
decoder
|
Optional instance of the decoder model.
|
num_anchors_per_location
|
Optional number of anchors per pixel location for
building the RetinaNetHead. If an int, the same number is used for all
levels. If a dict, it specifies the number at each level. If none, it
uses len(aspect_ratios) * num_scales from the anchor config by default.
|
anchor_boxes
|
Optional fixed multilevel anchor boxes for inference.
|
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates. Some content is licensed under the numpy license.
Last updated 2026-11-06 UTC.
[null,null,["Last updated 2026-11-06 UTC."],[],[]]