1812673d58f4eef5ca39427d193c5922fc40b2d0,train_tf2.py,,main,#,167

Before Change


    val_datagen = tf.keras.preprocessing.image.ImageDataGenerator(rescale=(1.0 / 255))
    train_generator = train_datagen.flow_from_directory(
        train_dir,
        target_size=(224, 224),
        batch_size=batch_size,
        class_mode="binary",
        shuffle=True)

After Change


        test_loss(t_loss)
        test_accuracy(labels, predictions)

    ds_metainfo = get_dataset_metainfo(dataset_name=args.dataset)
    ds_metainfo.update(args=args)
    assert (ds_metainfo.ml_type != "imgseg") or (args.batch_size == 1)
    assert (ds_metainfo.ml_type != "imgseg") or args.disable_cudnn_autotune

    batch_size = args.batch_size

    train_data, train_img_count = get_train_data_source(
        ds_metainfo=ds_metainfo,
        batch_size=batch_size,
        data_format=data_format)
    val_data, val_img_count = get_val_data_source(
        ds_metainfo=ds_metainfo,
        batch_size=batch_size,
        data_format=data_format)

    num_epochs = args.num_epochs
    for epoch in range(num_epochs):
        for images, labels in train_data:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: osmr/imgclsmob
Commit Name: 1812673d58f4eef5ca39427d193c5922fc40b2d0
Time: 2020-01-27
Author: osemery@gmail.com
File Name: train_tf2.py
Class Name:
Method Name: main


Project Name: osmr/imgclsmob
Commit Name: 2f4a31ca40c2fc3922e8002861fd768efd9a39f5
Time: 2019-05-12
Author: osemery@gmail.com
File Name: train_ch.py
Class Name:
Method Name: main


Project Name: osmr/imgclsmob
Commit Name: 7f95637dd388e6c9d253847d634bfc7b0af05dda
Time: 2019-05-11
Author: osemery@gmail.com
File Name: eval_ch.py
Class Name:
Method Name: main


Project Name: osmr/imgclsmob
Commit Name: 1812673d58f4eef5ca39427d193c5922fc40b2d0
Time: 2020-01-27
Author: osemery@gmail.com
File Name: train_tf2.py
Class Name:
Method Name: main