Skip to content

Commit

Permalink
no message
Browse files Browse the repository at this point in the history
  • Loading branch information
shenweichen committed Apr 10, 2020
1 parent 836782f commit c36d2c0
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions deepmatch/layers/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ def call(self, seq_value_len_list, mask=None, **kwargs):
seq_value_len_list = [seq_value_len_list]
if len(seq_value_len_list) == 1:
return seq_value_len_list[0]
# seq_value_len_list[1] = tf.squeeze(seq_value_len_list[1],axis=0)
expand_seq_value_len_list = list(map(lambda x: tf.expand_dims(x, axis=-1), seq_value_len_list))
a = concat_func(expand_seq_value_len_list)
if self.mode == "mean":
Expand All @@ -46,8 +45,6 @@ def get_config(self, ):
class SampledSoftmaxLayer(Layer):
def __init__(self, num_sampled=5, **kwargs):
self.num_sampled = num_sampled
# self.target_song_size = item_embedding.input_dim
# self.item_embedding = item_embedding
super(SampledSoftmaxLayer, self).__init__(**kwargs)

def build(self, input_shape):
Expand All @@ -57,9 +54,6 @@ def build(self, input_shape):
dtype=tf.float32,
trainable=False,
name="bias")
# if not self.item_embedding.built:
# self.item_embedding.build([])
# self.trainable_weights.append(self.item_embedding.embeddings)
super(SampledSoftmaxLayer, self).build(input_shape)

def call(self, inputs_with_label_idx, training=None, **kwargs):
Expand Down

0 comments on commit c36d2c0

Please sign in to comment.