tfm.vision.factory_3d.register_model_builder

Decorates a builder of model class.

The builder should be a Callable (a class or a function). This decorator supports registration of backbone builder as follows:

class MyModel(tf.keras.Model):
  pass

@register_backbone_builder('mybackbone')
def builder(input_specs, config, l2_reg):
  return MyModel(...)

# Builds a MyModel object.
my_backbone = build_backbone_3d(input_specs, config, l2_reg)

key the key to look up the builder.

A callable for use as class decorator that registers the decorated class for creation from an instance of model class.