representation_graphs.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:tensorrec 作者: jfkirk 项目源码 文件源码
def linear_representation_graph(tf_features, n_components, n_features, node_name_ending):

    # Create variable nodes
    tf_linear_weights = tf.Variable(tf.random_normal([n_features, n_components], stddev=.5),
                                    name='linear_weights_%s' % node_name_ending)
    tf_repr = tf.sparse_tensor_dense_matmul(tf_features, tf_linear_weights)

    # Return repr layer and variables
    return tf_repr, [tf_linear_weights]
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号