Commit e2bc6a63 authored by leswing's avatar leswing
Browse files

yapf

parent d4dcc936
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -483,7 +483,7 @@ class L2Loss(Layer):
    inputs = self._get_input_tensors(in_layers, True)
    guess, label = inputs[0], inputs[1]
    out_tensor = tf.reduce_mean(
        tf.square(guess - label))
        tf.square(guess - label), axis=list(range(1, len(label.shape))))
    if set_tensors:
      self.out_tensor = out_tensor
    return out_tensor
+2 −2
Original line number Diff line number Diff line
@@ -9,7 +9,7 @@ __license__ = "MIT"
import sys

sys.path.append("../../models")
from deepchem.models.tensorgraph.layers import Layer, Feature, Label, AtomicConvolution, L2Loss
from deepchem.models.tensorgraph.layers import Layer, Feature, Label, AtomicConvolution, L2Loss, ReduceMean
from deepchem.models import TensorGraph

import numpy as np
@@ -212,7 +212,7 @@ def atomic_conv_model(
      ])

  label = Label(shape=(None, 1))
  loss = L2Loss(in_layers=[score, label])
  loss = ReduceMean(in_layers=L2Loss(in_layers=[score, label]))

  def feed_dict_generator(dataset, batch_size, epochs=1, pad_batches=True):