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_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
    self._variational = variational
    self.embedding = self._create_encoder(encoder_layers, dropout)
    self.output = self._create_decoder(decoder_layers, dropout)

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: 6

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: 8f2e61dca811d224fec17836987f8a359733cdc2
Time: 2017-07-26
Author: zqwu@stanford.edu
File Name: deepchem/models/tensorgraph/models/graph_models.py
Class Name: MPNNTensorGraph
Method Name: build_graph


Project Name: deepchem/deepchem
Commit Name: cb4ea667b426ebc6595cc0e8be81c94955266c9c
Time: 2020-03-05
Author: peastman@stanford.edu
File Name: deepchem/utils/test/test_generator_evaluator.py
Class Name: TestGeneratorEvaluator
Method Name: test_compute_model_performance_multitask_classifier