1c75176947730de8322acf6ad996096625e92e3a,tensorflow_lattice/python/rtl_layer.py,RTL,call,#RTL#Any#,217

Before Change


            tf.concat([input_tensors[i] for i in inputs_for_unit], axis=1))
      if len(lattice_inputs) > 1:
        // Stack into (-1, units, lattice_rank) for multi-unit lattice layer
        lattice_inputs = tf.stack(lattice_inputs, axis=1)
      else:
        lattice_inputs = lattice_inputs[0]
      output_monotonicity = max(monotonicities)
      // Call each lattice layer and store based on output monotonicy.

After Change


    for monotonicities, inputs_for_units in self._rtl_structure:
      if len(inputs_for_units) == 1:
        inputs_for_units = inputs_for_units[0]
      lattice_inputs = tf.gather(flattened_input, inputs_for_units, axis=1)
      output_monotonicity = max(monotonicities)
      // Call each lattice layer and store based on output monotonicy.
      outputs_for_monotonicity[output_monotonicity].append(
          self._lattice_layers[str(monotonicities)](lattice_inputs))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 4

Instances


Project Name: tensorflow/lattice
Commit Name: 1c75176947730de8322acf6ad996096625e92e3a
Time: 2020-06-15
Author: no-reply@google.com
File Name: tensorflow_lattice/python/rtl_layer.py
Class Name: RTL
Method Name: call


Project Name: ixaxaar/pytorch-dnc
Commit Name: 2026a8939d9ccc3e26ac776db5b4788846fd166c
Time: 2017-12-03
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: update_usage


Project Name: ixaxaar/pytorch-dnc
Commit Name: 2026a8939d9ccc3e26ac776db5b4788846fd166c
Time: 2017-12-03
Author: root@ixaxaar.in
File Name: dnc/sparse_memory.py
Class Name: SparseMemory
Method Name: read_from_sparse_memory