2bfe5bfcec7759ae022b1a479411aa7d1b8401f1,example/example7.py,,,#,26

Before Change


pool_layer = 1
subset_vec_all_layers = []

common = {
    "model_dir": "//data/cips/data/lab/data/model/uncased_L-12_H-768_A-12",
    "num_worker": 2,
    "num_repeat": 5,
    "port": 6006,
    "port_out": 6007,
    "max_seq_len": 20,
    "client_batch_size": 2048,
    "max_batch_size": 256,
    "num_client": 1,
    "pooling_strategy": PoolingStrategy.REDUCE_MEAN,
    "pooling_layer": [-2],
    "gpu_memory_fraction": 0.5,
    "xla": False,
    "cpu": False,
    "verbose": False,
    "device_map": []
}
args = namedtuple("args_namedtuple", ",".join(common.keys()))
for k, v in common.items():
    setattr(args, k, v)

After Change


//load bert vectors and labels
subset_vec_all_layers = np.load("example7_5k_mxnet.npy")
np_subset_label = np.load("example7_5k_mxnet_subset_label.npy")
subset_label = np_subset_label.tolist()
//=========================== visulize ===========================
def vis(embed, vis_alg="PCA", pool_alg="REDUCE_MEAN"):
    plt.close()
    fig = plt.figure()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 2bfe5bfcec7759ae022b1a479411aa7d1b8401f1
Time: 2019-05-06
Author: zyn2122@gmail.com
File Name: example/example7.py
Class Name:
Method Name:


Project Name: googledatalab/pydatalab
Commit Name: 04c749f7175fd3e180b1a27884e5a65622cc36be
Time: 2017-07-05
Author: brandondutra@google.com
File Name: solutionbox/code_free_ml/test_mltoolbox/test_training.py
Class Name: TestSpecialCharacters
Method Name: testCommaQuote


Project Name: nilearn/nilearn
Commit Name: ab2c5d3a8c733e5febcfce970a9b967fb8edba1e
Time: 2015-09-15
Author: sb238920@is223297.intra.cea.fr
File Name: examples/connectivity/plot_adhd_tangent.py
Class Name:
Method Name:


Project Name: datascienceinc/Skater
Commit Name: 058c79c9653af78184deb94aa3853f8a37eec32a
Time: 2017-03-02
Author: aikramer2@gmail.com
File Name: pyinterpret/core/global_interpretation/partial_dependence.py
Class Name: PartialDependence
Method Name: partial_dependence