c2ba7a00469d0394a4a8073c355cfb884d788cc9,ch12/train_model.py,,,#,18

Before Change


    saves_path = os.path.join(SAVES_DIR, args.name)
    os.makedirs(saves_path, exist_ok=True)

    dialogues = subtitles.read_file(DATA_FILE, dialog_seconds=5)
    dial_dict = subtitles.dialogues_dict(dialogues)
    log.info("Loaded %d dialogues with %d phrases and %d uniq words",
             len(dialogues), sum(map(len, dialogues)), len(dial_dict))
    emb_dict, emb = data.read_embeddings(dial_dict)

After Change


    os.makedirs(saves_path, exist_ok=True)

    if args.category is not None:
        data_path = os.path.join(DATA_DIR, args.category)
    else:
        data_path = DATA_DIR
    dialogues = subtitles.read_dir(data_path)
    if not dialogues:
        log.error("No data found in %s!", data_path)
        sys.exit()

    dial_dict = subtitles.dialogues_dict(dialogues)
    log.info("Loaded %d dialogues with %d phrases and %d uniq words",
             len(dialogues), sum(map(len, dialogues)), len(dial_dict))
    emb_dict, emb = data.read_embeddings(dial_dict)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: PacktPublishing/Deep-Reinforcement-Learning-Hands-On
Commit Name: c2ba7a00469d0394a4a8073c355cfb884d788cc9
Time: 2018-01-04
Author: max.lapan@gmail.com
File Name: ch12/train_model.py
Class Name:
Method Name:


Project Name: HyperGAN/HyperGAN
Commit Name: 86954cc4ca7b6685732ae05075701d2a8a8fa929
Time: 2017-06-04
Author: martyn@255bits.com
File Name: hypergan/loaders/image_loader.py
Class Name: ImageLoader
Method Name: load


Project Name: pantsbuild/pants
Commit Name: 06fccfcb7a5223c6b3d247f0197061d18f777922
Time: 2018-05-11
Author: stuhood@twitter.com
File Name: src/python/pants/backend/jvm/tasks/jvm_compile/jvm_compile.py
Class Name: JvmCompile
Method Name: _compile_vts