You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jan 24, 2024. It is now read-only.
目前我们会在 eval frame 的 callback 入口处检查是否是 Paddle 的函数,如果是则直接跳过,相关逻辑如下:
https://github.com/2742195759/paddle-symbolic-trace/blob/6b77ad2326d74a91e80009699b30aa27137f774d/symbolic_trace/opcode_translator/transform.py#L9
https://github.com/2742195759/paddle-symbolic-trace/blob/6b77ad2326d74a91e80009699b30aa27137f774d/symbolic_trace/opcode_translator/skip_files.py#L93
paddle.nn.Layer.__call__
这个函数也会被这个规则跳过,而所有继承自Layer
的网络都会去找到这个paddle.nn.Layer.__call__
来作为函数入口,所以我们现在还不支持使用symbolic_trace
函数直接装饰,需要一些 trick,用函数包装一下,如:https://github.com/2742195759/paddle-symbolic-trace/blob/6b77ad2326d74a91e80009699b30aa27137f774d/tests/test_17_paddle_layer.py#L18-L19
我们希望优化 Paddle 相关函数的 skip 机制,以支持直接装饰
paddle.nn.Layer
The text was updated successfully, but these errors were encountered: