206cfa4bb0fea0cee4c75223625c5e95b57d7010,python/tests/test_tf_transformer.py,,test_attn_value,#Any#,31

Before Change


    q, k, v = qkv
    with tf.device("/cpu:0"):
        q = tf.zeros_like(q)
        res = dot_product_attention(q, k, v)
        with tf.Session() as sess:
            res, gold = sess.run([res, v])
        B, H, T, _ = q.get_shape().as_list()
        for b in range(B):

After Change


    with tf.device("/cpu:0"):
        q = tf.zeros_like(q)
        dot_product_attention = SeqDotProductAttention(0.0)
        res = dot_product_attention((q, k, v, None))
        if get_version(tf) < 2:
            with tf.Session() as sess:
                res, gold = sess.run([res, v])
        else:
            res, gold = res.numpy(), v.numpy()
        B, H, T, _ = q.get_shape().as_list()
        for b in range(B):
            for h in range(H):
                for t in range(T):
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 6

Instances


Project Name: dpressel/mead-baseline
Commit Name: 206cfa4bb0fea0cee4c75223625c5e95b57d7010
Time: 2019-11-19
Author: blester125@gmail.com
File Name: python/tests/test_tf_transformer.py
Class Name:
Method Name: test_attn_value


Project Name: dpressel/mead-baseline
Commit Name: 206cfa4bb0fea0cee4c75223625c5e95b57d7010
Time: 2019-11-19
Author: blester125@gmail.com
File Name: python/tests/test_tf_transformer.py
Class Name:
Method Name: test_attn_value_seq_mask


Project Name: dpressel/mead-baseline
Commit Name: 206cfa4bb0fea0cee4c75223625c5e95b57d7010
Time: 2019-11-19
Author: blester125@gmail.com
File Name: python/tests/test_tf_transformer.py
Class Name:
Method Name: test_attn_value_sub_mask