Commit 83c5e29c authored by abster12's avatar abster12
Browse files

correcting errors

parent 0327d809
Loading
Loading
Loading
Loading
+23 −21
Original line number Diff line number Diff line
@@ -4306,7 +4306,9 @@ class GraphCNN(Layer):


class Hingeloss():
  def __init__(self,in_layers=None,weights,batch_size,labels,reg,**kwargs):

  def __init__(self, in_layers=None, weights, batch_size, labels, reg,
               **kwargs):

    self.weights = weights
    self.batch_size = batch_size
@@ -4314,10 +4316,10 @@ class Hingeloss():
    self.reg = reg
    super(Hingeloss, self).__init__(in_layers, **kwargs)


  def create_tensor(self, in_layers=None, set_tensors=True, **kwargs):
    inputs = self.get_input_tensors(in_layers)
    weights,batch_size,labels,reg=inputs[0],inputs[1],inputs[2],inputs[3]
    weights, batch_size, labels, reg = inputs[0], inputs[1], inputs[2], inputs[
        3]
    scores = tf.matmul(batch_size, weights)
    labels_i = scores[np.arange(scores.shape[0]), labels]
    loss_i = tf.maximum(0, scores - tf.transpose(labels_i) + 1)
+9 −10
Original line number Diff line number Diff line
@@ -888,4 +888,3 @@ class TestLayers(test_util.TensorFlowTestCase):
      out_tensor = Hingeloss()(input_tensor)
      out_tensor = out_tensor.eval()
      assert out_tensor.shape == (batch_size,)