Skip to content

Commit

Permalink
Update amsoftmax.py
Browse files Browse the repository at this point in the history
  • Loading branch information
hao-qiang authored Sep 29, 2018
1 parent a304d2d commit 84676d1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions amsoftmax.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import tensorflow as tf
import numpy as np

class Cosine(Layer):
class AMSoftmax(Layer):
def __init__(self, output_dim, **kwargs):
self.output_dim = output_dim
super(AMSoftmax, self).__init__(**kwargs)
Expand Down Expand Up @@ -56,4 +56,4 @@ def amsoftmax_loss(y_true, y_pred):

cross_ent = tf.nn.softmax_cross_entropy_with_logits(labels=y_true, logits=added_embeddingFeature)
loss = tf.reduce_mean(cross_ent)
return loss
return loss

0 comments on commit 84676d1

Please sign in to comment.