Commit 56c3ba93 authored by Vignesh's avatar Vignesh
Browse files

Hopefully fixed yapf formatting

parent 05789988
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -335,8 +335,8 @@ class DTNNEmbedding(Layer):
    if in_layers is None:
      in_layers = self.in_layers
    in_layers = convert_to_layers(in_layers)

    self.build()

    atom_number = in_layers[0].out_tensor
    atom_number = tf.cast(atom_number, dtype=tf.int32)
    atom_features = tf.nn.embedding_lookup(self.embedding_list, atom_number)
+0 −1
Original line number Diff line number Diff line
@@ -248,7 +248,6 @@ class TextCNNModel(TensorGraph):
    tensors = dict()
    for layer, column in zip(self.features, feature_columns):
      tensors[layer] = tf.feature_column.input_layer(features, [column])

    if weight_column is not None:
      tensors[self.task_weights[0]] = tf.feature_column.input_layer(
          features, [weight_column])
+0 −3
Original line number Diff line number Diff line
@@ -282,7 +282,6 @@ class TestEstimators(unittest.TestCase):

  def test_textcnn_classification(self):
    """Test creating an Estimator from TextCNN for classification."""

    n_tasks = 1
    n_samples = 5

@@ -331,7 +330,6 @@ class TestEstimators(unittest.TestCase):

  def test_textcnn_regression(self):
    """Test creating an Estimator from TextCNN for regression."""

    n_tasks = 1
    n_samples = 10

@@ -357,7 +355,6 @@ class TestEstimators(unittest.TestCase):
          batch_size=n_samples, epochs=epochs).get_next()
      return {'x': x, 'weights': weights}, y

    print(next(dataset.itersamples()))
    # Create an estimator from it.
    x_col = tf.feature_column.numeric_column('x', shape=(seq_length,))
    weight_col = tf.feature_column.numeric_column('weights', shape=(n_tasks,))