417c082cafff43baa996ef21a614dcc9ad524393,tensorlayer/layers/recurrent.py,,target_mask_op,#Any#Any#,857

Before Change


    elif data_shape_size == 2:
        return tf.cast(tf.not_equal(data, pad_val), dtype=tf.int32)
    elif data_shape_size == 1:
        raise ValueError("target_mask_op: data has wrong shape!")
    else:
        raise ValueError("target_mask_op: handling data_shape_size %s hasn"t been implemented!" % (data_shape_size))

After Change


    

    if not isinstance(data, tf.Tensor):
        raise AttributeError("target_mask_op: the type of input data should be tf.Tensor but got %s." % type(data))
    data_shape_size = data.get_shape().ndims
    if data_shape_size == 3:
        return tf.cast(tf.reduce_any(input_tensor=tf.not_equal(data, pad_val), axis=2), dtype=tf.int32)
    elif data_shape_size == 2:
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorlayer/tensorlayer
Commit Name: 417c082cafff43baa996ef21a614dcc9ad524393
Time: 2019-06-06
Author: jingqing.zhang15@imperial.ac.uk
File Name: tensorlayer/layers/recurrent.py
Class Name:
Method Name: target_mask_op


Project Name: ray-project/ray
Commit Name: 79eefbf357723a805641b892e0fdab858ff03cae
Time: 2020-08-25
Author: robertnishihara@gmail.com
File Name: python/ray/worker.py
Class Name:
Method Name: kill


Project Name: ray-project/ray
Commit Name: 860eb6f13a0e570b95bd251eb53105473850cbdc
Time: 2020-05-24
Author: ed.nmi.oakes@gmail.com
File Name: python/ray/actor.py
Class Name: ActorClass
Method Name: _remote