81092be4e1e900473cd008fec50dc49c8af2eed9,tensorflow_hub/keras_layer.py,KerasLayer,call,#KerasLayer#Any#Any#,166

Before Change



  def call(self, inputs, training=None):
    // We basically want to call this...
    f = functools.partial(self._callable, inputs, **self._arguments)
    // ...but we may also have to pass a Python boolean for `training`, which
    // is the logical "and" of this layer"s trainability and what the surrounding
    // model is doing (analogous to tf.keras.layers.BatchNormalization in TF2).
    // For the latter, we have to look in two places: the `training` argument,

After Change



    // Unwrap dicts returned by signatures.
    if self._output_key:
      if not isinstance(result, dict):
        raise ValueError("Specifying `output_key` is forbidden if output "
                         "type %s is not a dict." % type(result))
      if self._output_key not in result:
        raise ValueError(
            "KerasLayer output does not contain the output key %s "
            "(available: %s)." % (self._output_key, result.keys()))
      result = result[self._output_key]

    // TODO(b/142213824): Remove setting shapes when shape inference works.
    result = self._apply_output_shape_if_set(inputs, result)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 5

Instances


Project Name: tensorflow/hub
Commit Name: 81092be4e1e900473cd008fec50dc49c8af2eed9
Time: 2019-10-29
Author: no-reply@google.com
File Name: tensorflow_hub/keras_layer.py
Class Name: KerasLayer
Method Name: call


Project Name: tensorflow/tpu
Commit Name: 1da5440d8444f99f79b597356e9342ffab0eaf5f
Time: 2020-04-14
Author: pengchong@google.com
File Name: models/official/detection/modeling/architecture/heads.py
Class Name: RpnHead
Method Name: __init__


Project Name: elfi-dev/elfi
Commit Name: 6f4b9ca4ffa9fcf0a437fc2ff56860ad13b61077
Time: 2016-12-07
Author: jarno.lintusaari@aalto.fi
File Name: elfi/distributions.py
Class Name: RandomVariable
Method Name: _prepare_operation