0fc17e8a4a716eac5097073dceb1b52dce3b534f,example4.py,,,#,32

Before Change


        cnt += 1
        if cnt % 10 == 0:
            time_used = time.perf_counter() - start_t
            print("speed: %d/s" % int(x["feature"].shape[0] / time_used))
            start_t = time.perf_counter()

After Change


    while True:
        x = sess.run(data_node)
        cnt += 1
        num_samples += x["feature"].shape[0]
        if cnt % 10 == 0:
            time_used = time.perf_counter() - start_t
            print("data speed: %d/s" % int(num_samples / time_used))
            cnt, num_samples, start_t = 0, 0, time.perf_counter()
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 9

Instances


Project Name: hanxiao/bert-as-service
Commit Name: 0fc17e8a4a716eac5097073dceb1b52dce3b534f
Time: 2018-11-27
Author: hanhxiao@tencent.com
File Name: example4.py
Class Name:
Method Name:


Project Name: hanxiao/bert-as-service
Commit Name: e7ca574c2479137864e86b7c8e2555ded9a89bda
Time: 2018-11-27
Author: hanhxiao@tencent.com
File Name: example5.py
Class Name:
Method Name:


Project Name: hanxiao/bert-as-service
Commit Name: 23440472fbed6263ec7723a2c58b27c87cf55f62
Time: 2018-11-27
Author: hanhxiao@tencent.com
File Name: example4.py
Class Name:
Method Name: