Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
T0L0ve opened this issue Sep 27, 2023 · 0 comments
Labels

Comments

@T0L0ve
Copy link

T0L0ve commented Sep 27, 2023

代码就是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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant