Commit dacf10d0 authored by miaecle's avatar miaecle
Browse files

update docs

parent f90d30aa
Loading
Loading
Loading
Loading
+18 −12
Original line number Diff line number Diff line
@@ -582,15 +582,17 @@ class DAGLayer(Layer):
        max_atoms: int, optional
          Maximum number of atoms in molecules.
        layer_sizes: list of int, optional(default=[100])
          Structure of hidden layer(s)
          List of hidden layer size(s): 
          length of this list represents the number of hidden layers, 
          and each element is the width of corresponding hidden layer.
        init: str, optional
          Weight initialization for filters.
        activation: str, optional
          Activation function applied
          Activation function applied.
        dropout: float, optional
          Dropout probability, not supported here
          Dropout probability in hidden layer(s).
        batch_size: int, optional
          number of molecules in a batch
          number of molecules in a batch.
        """
    super(DAGLayer, self).__init__(**kwargs)

@@ -704,8 +706,9 @@ class DAGLayer(Layer):
    for idw, W in enumerate(W_list):
      outputs = tf.nn.xw_plus_b(outputs, W, b_list[idw])
      outputs = self.activation(outputs)
      if 'training' in kwargs and kwargs['training'] == 1.0 and not self.dropout is None:
        outputs = tf.nn.dropout(outputs, 1.0 - self.dropout)
      training = kwargs['training'] if 'training' in kwargs else 1.0
      if not self.dropout is None:
        outputs = tf.nn.dropout(outputs, 1.0 - self.dropout * training)
    return outputs

  def none_tensors(self):
@@ -736,19 +739,21 @@ class DAGGather(Layer):
        Parameters
        ----------
        n_graph_feat: int, optional
          Number of features for each atom
          Number of features for each atom.
        n_outputs: int, optional
          Number of features for each molecule.
        max_atoms: int, optional
          Maximum number of atoms in molecules.
        layer_sizes: list of int, optional
          Structure of hidden layer(s)
          List of hidden layer size(s): 
          length of this list represents the number of hidden layers, 
          and each element is the width of corresponding hidden layer.
        init: str, optional
          Weight initialization for filters.
        activation: str, optional
          Activation function applied
          Activation function applied.
        dropout: float, optional
          Dropout probability, not supported
          Dropout probability in the hidden layer(s).
        """
    super(DAGGather, self).__init__(**kwargs)

@@ -810,8 +815,9 @@ class DAGGather(Layer):
    for idw, W in enumerate(W_list):
      outputs = tf.nn.xw_plus_b(outputs, W, b_list[idw])
      outputs = self.activation(outputs)
      if 'training' in kwargs and kwargs['training'] == 1.0 and not self.dropout is None:
        outputs = tf.nn.dropout(outputs, 1.0 - self.dropout)
      training = kwargs['training'] if 'training' in kwargs else 1.0
      if not self.dropout is None:
        outputs = tf.nn.dropout(outputs, 1.0 - self.dropout * training)
    return outputs

  def none_tensors(self):
+11 −9
Original line number Diff line number Diff line
@@ -375,22 +375,24 @@ class DAGModel(TensorGraph):
            Parameters
            ----------
            n_tasks: int
              Number of tasks
              Number of tasks.
            max_atoms: int, optional
              Maximum number of atoms in a molecule, should be defined based on dataset
              Maximum number of atoms in a molecule, should be defined based on dataset.
            n_atom_feat: int, optional
              Number of features per atom.
            n_graph_feat: int, optional
              Number of features for atom in the graph
              Number of features for atom in the graph.
            n_outputs: int, optional
              Number of features for each molecule
              Number of features for each molecule.
            layer_sizes: list of int, optional
              Structure of hidden layer(s) in DAG propagation step
              List of hidden layer size(s) in the propagation step: 
              length of this list represents the number of hidden layers, 
              and each element is the width of corresponding hidden layer.
            layer_sizes_gather: list of int, optional
              Structure of hidden layer(s) in DAG gather step
            dropout: None or float
              Dropout probability, applied after each propagation step and gather step
            mode: str
              List of hidden layer size(s) in the gather step. 
            dropout: None or float, optional
              Dropout probability, applied after each propagation step and gather step.
            mode: str, optional
              Either "classification" or "regression" for type of model.
            """
    self.n_tasks = n_tasks