Skip to content

为什么GPU运行时SparseFeat中vocabulary_size的值大小不会引起错误 #535

Open
@T0L0ve

Description

代码就是demo中的例子,例子中SparseFeat的vocabulary_size大小设置为最大值+1

fixlen_feature_columns = [SparseFeat(feat, data[feat].max() + 1,embedding_dim=4)
                              for feat in sparse_features]

当我将其改为1时代码仍能成功运行

fixlen_feature_columns = [SparseFeat(feat, 1,embedding_dim=4)
                              for feat in sparse_features]

image
而当我禁用gpu,使用cpu训练模型时tensorflow则会提示我越界错误
image

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions