cdd8a8d686272217f7d9a7a0de34262192696b28,batchflow/models/tf/encoder_decoder.py,VariationalAutoEncoder,embedding,#Any#Any#Any#,367
Before Change
base_block = kwargs.get("base")
mean = base_block(inputs, name="mean", **kwargs)
std = base_block(inputs, name="std", **kwargs)
eps = tf.random.normal(shape=tf.shape(mean))
return mean + eps*std
After Change
x = inputs
with tf.variable_scope(name):
for i in range(steps):
args = {**kwargs, **unpack_args(kwargs, i, steps)} // enforce priority of keys
mean = base_block(x, name="mean-"+str(i), **args)
std = base_block(x, name="std-"+str(i), **args)
eps = tf.random.normal(shape=tf.shape(mean), name="eps-"+str(i))
x = mean + eps*std
return x
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: analysiscenter/batchflow
Commit Name: cdd8a8d686272217f7d9a7a0de34262192696b28
Time: 2019-07-04
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: VariationalAutoEncoder
Method Name: embedding
Project Name: analysiscenter/batchflow
Commit Name: 3b755782ada6082c9bca24a155b6ea4c38bd5070
Time: 2019-09-05
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: encoder
Project Name: analysiscenter/batchflow
Commit Name: 3b755782ada6082c9bca24a155b6ea4c38bd5070
Time: 2019-09-05
Author: Tsimfer.SA@gazprom-neft.ru
File Name: batchflow/models/tf/encoder_decoder.py
Class Name: EncoderDecoder
Method Name: decoder