dad71ab422adaccc93d4b239cd15feaa87ec4073,keras/layers/preprocessing/discretization.py,Discretization,build,#Discretization#Any#,205
Before Change
shape=(initial_bins.size,),
dtype=tf.float32,
initializer=tf.compat.v1.constant_initializer(initial_bins))
super(Discretization, self).build(input_shape)
def get_config(self):
config = {
"bin_boundaries": self.bin_boundaries,
After Change
if self.stateful:
// Summary contains two equal length vectors of bins at index 0 and weights
// at index 1.
self.summary = self.add_weight(
name="summary",
shape=(2, None),
dtype=tf.float32,
initializer=lambda shape, dtype: [[], []], // pylint: disable=unused-arguments
trainable=False)
self.built = True
def update_state(self, data):
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: keras-team/keras
Commit Name: dad71ab422adaccc93d4b239cd15feaa87ec4073
Time: 2021-04-13
Author: scottzhu@google.com
File Name: keras/layers/preprocessing/discretization.py
Class Name: Discretization
Method Name: build
Project Name: tensorflow/agents
Commit Name: 5a5bff9357a92ec6684b1e159deb5b3d8ec5f68c
Time: 2019-02-13
Author: no-reply@google.com
File Name: tf_agents/metrics/tf_metrics.py
Class Name: NumberOfEpisodes
Method Name: __init__
Project Name: tensorflow/agents
Commit Name: 5a5bff9357a92ec6684b1e159deb5b3d8ec5f68c
Time: 2019-02-13
Author: no-reply@google.com
File Name: tf_agents/metrics/tf_metrics.py
Class Name: EnvironmentSteps
Method Name: __init__