b85a210e72d4333b71c72f33b905de0ad0070c17,scripts/train.py,,,#,10

Before Change



//Train on session pictures
sh = dk.sessions.SessionHandler(sessions_path="~/donkey_data/sessions/")
s = sh.load("2017_02_11__06_44_32_PM")
X, Y = s.load_dataset()


//Train on simulated pictures

After Change


// Get args.
args = docopt(__doc__)

if __name__ == "__main__":
    print(args)
    sessions = args["--sessions"].split(",")
    epochs = int(args["--epochs"])
    //Train on session pictures
    sh = dk.sessions.SessionHandler(sessions_path="~/donkey_data/sessions/")
    s = sh.load(sessions[0])
    X, Y = s.load_dataset()


    //Train on simulated pictures
    //X, Y = dk.datasets.moving_square(n_frames=2000, return_x=True, return_y=False)


    //print("Downloading file, this could take some time.")
    //url = "https://s3.amazonaws.com/donkey_resources/port.pkl"
    //X, Y = dk.datasets.load_url(url)

    print("Loading Model.")
    //m = dk.models.cnn3_full1_relu()
    m = keras.models.load_model("/home/wroscoe/donkey_data/models/best-diff_lines2.hdf5")


    filepath="best-"+sessions[0]+".hdf5"
    checkpoint = ModelCheckpoint(filepath, monitor="val_loss", verbose=1, 
                                 save_best_only=True, mode="min")
    callbacks_list = [checkpoint]

    hist = m.fit(X, Y, batch_size=64, nb_epoch=epochs, 
                     validation_split=.2, callbacks=callbacks_list)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: autorope/donkeycar
Commit Name: b85a210e72d4333b71c72f33b905de0ad0070c17
Time: 2017-02-18
Author: wroscoe@gmail.com
File Name: scripts/train.py
Class Name:
Method Name:


Project Name: NVIDIA/sentiment-discovery
Commit Name: bfebb3f586ce9e7d6d14c45329ef651d48a01d03
Time: 2018-11-21
Author: raulp@nvidia.com
File Name: new_main.py
Class Name:
Method Name: main


Project Name: dPys/PyNets
Commit Name: 69929edfd7efb676b6629df9e44f79ddc9c4dc49
Time: 2020-07-03
Author: dpisner@utexas.edu
File Name: pynets/registration/reg_utils.py
Class Name:
Method Name: atlas2t1w_align