Added aspect_ratios_per_layer to arguments for SSDInputEncoder

Signed-off-by: Jim Martens <github@2martens.de>
This commit is contained in:
2019-06-05 12:56:07 +02:00
parent 1b52f4c9dc
commit c893954120

View File

@ -404,7 +404,13 @@ def train(dataset: tf.data.Dataset,
# input encoder
input_encoder = ssd_input_encoder.SSDInputEncoder(IMAGE_SIZE[0], IMAGE_SIZE[1],
N_CLASSES, ssd.predictor_sizes,
steps=[8, 16, 32, 64, 100, 300])
steps=[8, 16, 32, 64, 100, 300],
aspect_ratios_per_layer=[[1.0, 2.0, 0.5],
[1.0, 2.0, 0.5, 3.0, 1.0 / 3.0],
[1.0, 2.0, 0.5, 3.0, 1.0 / 3.0],
[1.0, 2.0, 0.5, 3.0, 1.0 / 3.0],
[1.0, 2.0, 0.5],
[1.0, 2.0, 0.5]])
def _get_last_epoch(epoch_var: tf.Variable, **kwargs) -> int:
return int(epoch_var)