文档链接&描述 Document Links & Description
(4)方式四:指定非 Tensor 参数类型
says:
net = to_static(input_spec=[InputSpec(shape=[None, 10], name='x'), True])
which has a conflict with 目前仅支持指定 Tensor 类型信息,非 Tensor 类型信息均使用 函数定义的默认值
请提出你的建议 Please give your suggestion
I don't know the implementation of paddle.jit.to_static , so I don't known what to suggest.
Please refer to this :
#45485
4条答案
按热度按时间6bc51xsx1#
您好,我们已经收到了您的问题,会安排技术人员尽快解答您的问题,请耐心等待。请您再次检查是否提供了清晰的问题描述、复现代码、环境&版本、报错信息等。同时,您也可以通过查看 官网API文档 、 常见问题 、 历史Issue 、 AI社区 来寻求解答。祝您生活愉快~
Hi! We've received your issue and please be patient to get responded. We will arrange technicians to answer your questions as soon as possible. Please make sure that you have posted enough message to demo your request. You may also check out the API , FAQ , Github Issue and AI community to get the answer.Have a nice day!
u4vypkhs2#
n3ipq98p3#
The above code can work, thus shows that input_spec can be used to specify non-Tensor arguments in the forward method.
3j86kqsm4#
收到你的反馈,我们更新一下