Skip to content

unnecessary addition #9

@lmxhappy

Description

@lmxhappy

all_weights['feature_bias'] = tf.Variable(tf.random_uniform([self.features_M, 1], 0.0, 0.0), name='feature_bias') # features_M * 1
elements in all_weights['feature_bias'] are all zeros.
so in
# _________out _________ Bilinear = tf.reduce_sum(self.FM, 1, keep_dims=True) # None * 1 self.Feature_bias = tf.reduce_sum(tf.nn.embedding_lookup(self.weights['feature_bias'], self.train_features) , 1) # None * 1 Bias = self.weights['bias'] * tf.ones_like(self.train_labels) # None * 1 self.out = tf.add_n([Bilinear, self.Feature_bias, Bias]) # None * 1

all of elements in self.Feature_bias are zeros.
So, all_weights['feature_bias'] should be initialized from 0 and 1.

ok?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions