Commit 81593ded authored by leswing's avatar leswing
Browse files

Small bugfixes for atomic convs

parent 71f4abe2
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -40,7 +40,6 @@ transformers = [
]
for transformer in transformers:
  train_dataset = transformer.transform(train_dataset)
  test_dataset = transformer.transform(test_dataset)

at = [1., 6, 7., 8., 9., 11., 12., 15., 16., 17., 20., 25., 30., 35., 53.]
radial = [[12.0], [0.0, 4.0, 8.0], [4.0]]
+1 −1
Original line number Diff line number Diff line
@@ -282,7 +282,7 @@ def AtomicConvolutionLayer(X, Nbrs, Nbrs_Z, atom_types, radial_params, boxsize,
  """Atomic convoluation layer

  N = max_num_atoms, M = max_num_neighbors, B = batch_size, d = num_features
  l = num_radial_filters
  l = num_radial_filters * num_atom_types

  Parameters
  ----------
+3 −3
Original line number Diff line number Diff line
@@ -604,8 +604,8 @@ class TensorflowClassifier(TensorflowGraphModel):
      A tensor with shape batch_size containing the weighted cost for each
      example.
    """
    return tf.mul(
        tf.nn.softmax_cross_entropy_with_logits(logits, labels), weights)
    return tf.multiply(
        tf.nn.softmax_cross_entropy_with_logits(logits=logits, labels=labels), weights)

  def add_label_placeholders(self, graph, name_scopes):
    """Add Placeholders for labels for each task.
@@ -758,7 +758,7 @@ class TensorflowRegressor(TensorflowGraphModel):
      A tensor with shape batch_size containing the weighted cost for each
      example.
    """
    return tf.mul(0.5 * tf.square(output - labels), weights)
    return tf.multiply(0.5 * tf.square(output - labels), weights)

  def add_label_placeholders(self, graph, name_scopes):
    """Add Placeholders for labels for each task.