Commit e181ae37 authored by abster12's avatar abster12
Browse files

Added Documentation

parent 2c04b134
Loading
Loading
Loading
Loading
+11 −0
Original line number Diff line number Diff line
@@ -1536,6 +1536,12 @@ class InteratomicL2Distances(Layer):


class SparseSoftMaxCrossEntropy(Layer):
  """Computes Sparse softmax cross entropy between logits and labels.
  labels: Tensor of shape [d_0,d_1,....,d_{r-1}](where r is rank of logits) and must be of dtype int32 or int64.
  logits: Unscaled log probabilities of shape [d_0,....d{r-1},num_classes] and of dtype float32 or float64.
  Note: the rank of the logits should be 1 greater than that of labels.
  The output will be a tensor of same shape as labels and of same type as logits with the loss.
  """

  def __init__(self, in_layers=None, **kwargs):
    super(SparseSoftMaxCrossEntropy, self).__init__(in_layers, **kwargs)
@@ -4306,6 +4312,11 @@ class GraphCNN(Layer):


class Hingeloss(Layer):
  """This layer computes the hinge loss on inputs:[labels,logits] 
  labels: The values of this tensor is expected to be 1.0 or 0.0. The shape should be the same as logits.
  logits: Holds the log probabilities for labels, a float tensor.
  The output is a weighted loss tensor of same shape as labels.
  """

  def __init__(self, in_layers=None, **kwargs):
    super(Hingeloss, self).__init__(in_layers, **kwargs)