f5d152d30e53fd6fadb04d10a7388648a0c3826e,examples/train_coco.py,,,#,52

Before Change


    )

    // start training
    model.fit_generator(
        generator=train_generator,
        steps_per_epoch=20000 // args.batch_size,  // len(train_generator.image_ids) // args.batch_size,
        epochs=50,
        verbose=1,
        callbacks=[
            keras.callbacks.ModelCheckpoint(os.path.join("snapshots", "resnet50_coco_best.h5"), monitor="loss", verbose=1, save_best_only=True),
            keras.callbacks.ReduceLROnPlateau(monitor="loss", factor=0.1, patience=2, verbose=1, mode="auto", epsilon=0.0001, cooldown=0, min_lr=0),
            keras_retinanet.callbacks.coco.CocoEval(val_generator),
        ],
    )

    // store final result too
    model.save(os.path.join("snapshots", "resnet50_coco_final.h5"))

After Change


    val_image_data_generator = keras.preprocessing.image.ImageDataGenerator()

    // create a generator for training data
    train_generator = CocoGenerator(
        args.coco_path,
        "train2017",
        train_image_data_generator,
        batch_size=args.batch_size
    )

    // create a generator for testing data
    val_generator = CocoGenerator(
        args.coco_path,
        "val2017",
        val_image_data_generator,
        batch_size=args.batch_size
    )

    // start training
    training_model.fit_generator(
        generator=train_generator,
        steps_per_epoch=10000,
        epochs=50,
        verbose=1,
        callbacks=create_callbacks(model, training_model, prediction_model),
    )

    // store final result too
    model.save(os.path.join("snapshots", "resnet50_coco_final.h5"))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 22

Instances


Project Name: fizyr/keras-retinanet
Commit Name: f5d152d30e53fd6fadb04d10a7388648a0c3826e
Time: 2017-11-28
Author: j.c.gaiser@delftrobotics.com
File Name: examples/train_coco.py
Class Name:
Method Name:


Project Name: fizyr/keras-retinanet
Commit Name: da4848e1156edd2076b881ce2300ae2d3cc18246
Time: 2017-12-03
Author: j.c.gaiser@delftrobotics.com
File Name: examples/train_coco.py
Class Name:
Method Name:


Project Name: fizyr/keras-retinanet
Commit Name: f5d152d30e53fd6fadb04d10a7388648a0c3826e
Time: 2017-11-28
Author: j.c.gaiser@delftrobotics.com
File Name: examples/train_coco.py
Class Name:
Method Name:


Project Name: fizyr/keras-retinanet
Commit Name: f5d152d30e53fd6fadb04d10a7388648a0c3826e
Time: 2017-11-28
Author: j.c.gaiser@delftrobotics.com
File Name: examples/train_pascal.py
Class Name:
Method Name:


Project Name: fizyr/keras-retinanet
Commit Name: da4848e1156edd2076b881ce2300ae2d3cc18246
Time: 2017-12-03
Author: j.c.gaiser@delftrobotics.com
File Name: examples/train_pascal.py
Class Name:
Method Name: