5b8864d1863ac0474db8b657f023341686f4b1fb,benchmark/imdb.py,,imdb_raw,#,9

Before Change


    x_train = list(
        map(lambda sentence: " ".join(id_to_word[i] for i in sentence), x_train)
    )
    x_test = list(
        map(lambda sentence: " ".join(id_to_word[i] for i in sentence), x_test)
    )
    x_train = np.array(x_train, dtype=np.str)
    x_test = np.array(x_test, dtype=np.str)
    return (x_train, y_train), (x_test, y_test)

After Change


    )
    
    // set path to dataset
    IMDB_DATADIR = os.path.join(os.path.dirname(dataset), "aclImdb")
    
    classes = ["pos", "neg"]
    train_data = load_files(os.path.join(IMDB_DATADIR, "train"), shuffle=True, categories=classes)
    test_data = load_files(os.path.join(IMDB_DATADIR,  "test"), shuffle=False, categories=classes)

    encoding = "utf-8"
    x_train = np.array(train_data.data)
    y_train = np.array(train_data.target)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: jhfjhfj1/autokeras
Commit Name: 5b8864d1863ac0474db8b657f023341686f4b1fb
Time: 2020-09-24
Author: jhfjhfj1@gmail.com
File Name: benchmark/imdb.py
Class Name:
Method Name: imdb_raw


Project Name: CyberZHG/keras-bert
Commit Name: 186cda89269c33e681f143bf7e2b00cc49edac12
Time: 2019-09-28
Author: 853842+CyberZHG@users.noreply.github.com
File Name: setup.py
Class Name:
Method Name: