d1ae17e7f6a0916add0d2b4521acab3fbb42650e,tensorforce/util.py,,identity_operation,#Any#Any#,237

Before Change



def identity_operation(x, operation_name=None):
    zero = tf.zeros_like(input=x)
    if dtype(x=zero) == "bool":
        x = tf.math.logical_or(x=x, y=zero, name=operation_name)
    elif dtype(x=zero) in ("int", "long", "float"):
        x = tf.math.add(x=x, y=zero, name=operation_name)

After Change



def identity_operation(x, operation_name=None):
    zero = tf.zeros_like(input=x)
    if is_dtype(x=zero, dtype="bool"):
        x = tf.math.logical_or(x=x, y=zero, name=operation_name)
    elif dtype(x=zero) in ("int", "long", "float"):
        x = tf.math.add(x=x, y=zero, name=operation_name)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 3

Instances


Project Name: reinforceio/tensorforce
Commit Name: d1ae17e7f6a0916add0d2b4521acab3fbb42650e
Time: 2020-03-08
Author: alexkuhnle@t-online.de
File Name: tensorforce/util.py
Class Name:
Method Name: identity_operation


Project Name: reinforceio/tensorforce
Commit Name: d1ae17e7f6a0916add0d2b4521acab3fbb42650e
Time: 2020-03-08
Author: alexkuhnle@t-online.de
File Name: tensorforce/util.py
Class Name:
Method Name: is_consistent_with_value_spec


Project Name: reinforceio/tensorforce
Commit Name: d1ae17e7f6a0916add0d2b4521acab3fbb42650e
Time: 2020-03-08
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/parameters/piecewise_constant.py
Class Name: PiecewiseConstant
Method Name: parameter_value


Project Name: reinforceio/tensorforce
Commit Name: d1ae17e7f6a0916add0d2b4521acab3fbb42650e
Time: 2020-03-08
Author: alexkuhnle@t-online.de
File Name: tensorforce/core/layers/embedding.py
Class Name: Embedding
Method Name: tf_apply