48c1c96ac4cfec5580a5feb7eb7ef7c25c6db234,keras/backend/tensorflow_backend.py,,Switch,#,3087
Before Change
condition = tf.reshape(condition, cond_shape)
expr_shape = tf.shape(then_expression)
shape_diff = expr_shape - cond_shape
tile_shape = tf.where(shape_diff > 0, expr_shape, tf.ones_like(expr_shape))
condition = tf.tile(condition, tile_shape)
x = tf.where(condition, then_expression, else_expression)
return x
After Change
expr_shape = tf.shape(then_expression)
shape_diff = expr_shape - cond_shape
zero_expr_shape = tf.ones_like(expr_shape)
tile_shape = tf.where(shape_diff > 0, expr_shape, zero_expr_shape)
condition = tf.tile(condition, tile_shape)
x = tf.where(condition, then_expression, else_expression)
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 2
Instances
Project Name: keras-team/keras
Commit Name: 48c1c96ac4cfec5580a5feb7eb7ef7c25c6db234
Time: 2018-10-29
Author: gabrieldemarmiesse@gmail.com
File Name: keras/backend/tensorflow_backend.py
Class Name:
Method Name: Switch
Project Name: tensorflow/ranking
Commit Name: 6bf3f51cd0a312da842157665663c2dad9983248
Time: 2021-01-29
Author: xuanhui@google.com
File Name: tensorflow_ranking/python/losses_impl.py
Class Name: ClickEMLoss
Method Name: _compute_latent_prob
Project Name: dmlc/gluon-nlp
Commit Name: 8e84bd1c5a4cd0e61ee67abc532ab692e5335914
Time: 2020-12-10
Author: xshiab@connect.ust.hk
File Name: src/gluonnlp/attention_cell.py
Class Name:
Method Name: masked_logsoftmax