b68db1aaf6abe4d2cea8321cc6f1564228dd60f5,deepchem/models/tensorgraph/models/seqtoseq.py,SeqToSeq,__init__,#SeqToSeq#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#Any#,68

Before Change


    self._annealing_final_step = annealing_final_step
    self._annealing_start_step = annealing_start_step
    self._features = self._create_features()
    self._labels = layers.Label(shape=(None, None, len(output_tokens)))
    self._gather_indices = layers.Feature(
        shape=(self.batch_size, 2), dtype=tf.int32)
    self._reverse_input = reverse_input

After Change


    self.encoder = self._create_encoder(encoder_layers, dropout)
    self.decoder = self._create_decoder(decoder_layers, dropout)
    features = self._create_features()
    gather_indices = Input(shape=(2,), dtype=tf.int32)
    global_step = Input(shape=tuple(), dtype=tf.int32)
    embedding = self.encoder([features, gather_indices])
    self._embedding = self.encoder([features, gather_indices], training=False)
    if variational:
      randomizer = VariationalRandomizer(
          self._embedding_dimension, annealing_start_step, annealing_final_step)
      embedding = randomizer([self._embedding, global_step])
      self._embedding = randomizer(
          [self._embedding, global_step], training=False)
    output = self.decoder(embedding)
    model = tf.keras.Model(
        inputs=[features, gather_indices, global_step], outputs=output)
    super(SeqToSeq, self).__init__(model, self._create_loss(), **kwargs)

  def _create_features(self):
    return Input(shape=(None, len(self._input_tokens)))
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 3

Non-data size: 8

Instances


Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: __init__


Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: SeqToSeq
Method Name: _create_decoder


Project Name: deepchem/deepchem
Commit Name: b68db1aaf6abe4d2cea8321cc6f1564228dd60f5
Time: 2019-05-31
Author: peastman@stanford.edu
File Name: deepchem/models/tensorgraph/models/seqtoseq.py
Class Name: AspuruGuzikAutoEncoder
Method Name: _create_decoder