3a5cea5d75447d9beea3a2b71e67aaaad9698f0c,kfac/examples/autoencoder_mnist.py,,get_keras_autoencoder,#,263

Before Change



  // Create Encoder
  model.add(layers.Input(**input_kwargs))
  for size in _ENCODER_SIZES[:-1]:
    model.add(layers.Dense(
        size, activation=_NONLINEARITY, **dense_kwargs))
  model.add(layers.Dense(_ENCODER_SIZES[-1], **dense_kwargs))

  // Create Decoder
  for size in _DECODER_SIZES:

After Change



  else:
    // Make sure you always wrap the input in keras
    inputs = layers.Input(**input_kwargs)

    x = inputs
    // Create Encoder
    for size in _ENCODER_SIZES[:-1]:
      x = layers.Dense(size, activation=_NONLINEARITY, **dense_kwargs)(x)
    x = layers.Dense(_ENCODER_SIZES[-1], **dense_kwargs)(x)

    // Create Decoder
    for size in _DECODER_SIZES:
      x = layers.Dense(size, activation=_NONLINEARITY, **dense_kwargs)(x)
    x = layers.Dense(784, **dense_kwargs)(x)

    model = tf.keras.Model(inputs=inputs, outputs=x)

  return model

Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 3

Instances


Project Name: tensorflow/kfac
Commit Name: 3a5cea5d75447d9beea3a2b71e67aaaad9698f0c
Time: 2020-01-14
Author: no-reply@google.com
File Name: kfac/examples/autoencoder_mnist.py
Class Name:
Method Name: get_keras_autoencoder


Project Name: instacart/lore
Commit Name: 644f6485707aaf7d670216f7ea0885b7a0bc8a26
Time: 2017-12-08
Author: montanalow@users.noreply.github.com
File Name: lore/estimators/keras.py
Class Name: Keras
Method Name: build_inputs


Project Name: jhfjhfj1/autokeras
Commit Name: 16474aee0c575e615c78d32f2a170c3d7f8f0082
Time: 2017-12-30
Author: jhfjhfj1@gmail.com
File Name: autokeras/graph.py
Class Name: Graph
Method Name: produce_model