Creates EfficientDet-Lite2 model spec. See also: tflite_model_maker.object_detector.EfficientDetSpec
.
tflite_model_maker.object_detector.EfficientDetLite2Spec(
*,
model_name='efficientdet-lite2',
uri='https://hub.tensorflow.google.cn/tensorflow/efficientdet/lite2/feature-vector/1',
hparams='',
model_dir=None,
epochs=50,
batch_size=64,
steps_per_execution=1,
moving_average_decay=0,
var_freeze_expr='(efficientnet|fpn_cells|resample_p6)',
tflite_max_detections=25,
strategy=None,
tpu=None,
gcp_project=None,
tpu_zone=None,
use_xla=False,
profile=False,
debug=False,
tf_random_seed=111111,
verbose=0
)
Args | |
---|---|
model_name
|
Model name. |
uri
|
TF-Hub path/url to EfficientDet module. |
hparams
|
Hyperparameters used to overwrite default configuration. Can be
1) Dict, contains parameter names and values; 2) String, Comma separated k=v pairs of hyperparameters; 3) String, yaml filename which's a module containing attributes to use as hyperparameters. |
model_dir
|
The location to save the model checkpoint files. |
epochs
|
Default training epochs. |
batch_size
|
Training & Evaluation batch size. |
steps_per_execution
|
Number of steps per training execution. |
moving_average_decay
|
Float. The decay to use for maintaining moving averages of the trained parameters. |
var_freeze_expr
|
Expression to freeze variables. |
tflite_max_detections
|
The max number of output detections in the TFLite model. |
strategy
|
A string specifying which distribution strategy to use. Accepted values are 'tpu', 'gpus', None. tpu' means to use TPUStrategy. 'gpus' mean to use MirroredStrategy for multi-gpus. If None, use TF default with OneDeviceStrategy. |
tpu
|
The Cloud TPU to use for training. This should be either the name used when creating the Cloud TPU, or a grpc://ip.address.of.tpu:8470 url. |
gcp_project
|
Project name for the Cloud TPU-enabled project. If not specified, we will attempt to automatically detect the GCE project from metadata. |
tpu_zone
|
GCE zone where the Cloud TPU is located in. If not specified, we will attempt to automatically detect the GCE project from metadata. |
use_xla
|
Use XLA even if strategy is not tpu. If strategy is tpu, always use XLA, and this flag has no effect. |
profile
|
Enable profile mode. |
debug
|
Enable debug mode. |
tf_random_seed
|
Fixed random seed for deterministic execution across runs for debugging. |
verbose
|
verbosity mode for tf.keras.callbacks.ModelCheckpoint , 0 or 1.
|