Skip to content

关于inference在cpu上失败的提问 #4

@lee-liew

Description

@lee-liew

你好,感谢您的代码分享,收获很多。有一个问题,是否可以帮忙回答下。
我在train的时候,完美通过了。但在inference的时候提示如下,
Node: 'embedding_lookup'
indices[0,6] = 12 is not in [0, 12)
[[{{node embedding_lookup}}]] [Op:__inference_restored_function_body_349059]

代码错误定位到如下这一行:
y = model(x)

我在网上找了好久,大概是说cpu和gpu的区别,需要修改下input_size,但由于对tf不熟悉,不知道怎么修改您的代码,如果能帮助我,万分感谢~

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions