d97e9cd0c30980647f31c1003d6367e6a41c7124,tests/models/WDL_test.py,,test_WDL,#Any#Any#,13

Before Change


    model_name = "WDL"
    sample_size = 64
    feature_dim_dict = {"sparse": {}, "dense": []}
    wide_feature_dim_dict = {"sparse": {}, "dense": []}
    for name, num in zip(["sparse", "dense"], [sparse_feature_num, sparse_feature_num]):
        if name == "sparse":
            for i in range(num):
                feature_dim_dict[name][name + "_" +
                                       str(i)] = np.random.randint(1, 10)
        else:
            for i in range(num):
                feature_dim_dict[name].append(name + "_" + str(i))
    for name, num in zip(["sparse", "dense"], [wide_feature_num, wide_feature_num]):
        if name == "sparse":
            for i in range(num):
                wide_feature_dim_dict[name][name + "wide_" +
                                            str(i)] = np.random.randint(1, 10)
        else:
            for i in range(num):
                wide_feature_dim_dict[name].append(name + "wide_" + str(i))

    sparse_input = [np.random.randint(0, dim, sample_size)
                    for dim in feature_dim_dict["sparse"].values()]
    dense_input = [np.random.random(sample_size)
                   for name in feature_dim_dict["dense"]]
    wide_sparse_input = [np.random.randint(0, dim, sample_size)
                         for dim in wide_feature_dim_dict["sparse"].values()]
    wide_dense_input = [np.random.random(sample_size)
                        for name in wide_feature_dim_dict["dense"]]
    y = np.random.randint(0, 2, sample_size)

After Change


    model_name = "WDL"
    sample_size = 64
    feature_dim_dict = {"sparse": [], "dense": []}
    wide_feature_dim_dict = {"sparse": [], "dense": []}
    for name, num in zip(["sparse", "dense"], [sparse_feature_num, sparse_feature_num]):
        if name == "sparse":
            for i in range(num):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: shenweichen/DeepCTR
Commit Name: d97e9cd0c30980647f31c1003d6367e6a41c7124
Time: 2019-01-24
Author: wcshen1994@163.com
File Name: tests/models/WDL_test.py
Class Name:
Method Name: test_WDL


Project Name: microsoft/nni
Commit Name: 5623dbf32952bd7842d3d9c5cf12a8e97e2b1fab
Time: 2020-08-11
Author: 40699903+liuzhe-lz@users.noreply.github.com
File Name: src/sdk/pynni/nni/compression/tensorflow/default_layers.py
Class Name:
Method Name:


Project Name: shenweichen/DeepCTR
Commit Name: d97e9cd0c30980647f31c1003d6367e6a41c7124
Time: 2019-01-24
Author: wcshen1994@163.com
File Name: tests/models/MLR_test.py
Class Name:
Method Name: test_MLR