Module重构讨论 #334
xiezipeng-ML
started this conversation in
Ideas
Module重构讨论
#334
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
关于解决libai中参数层层传递的问题讨论,主要思路是让内部Module直接获取参数,不通过外部传递:
简单写了一个demo,可以直接放到libai下跑。
创建一个ModuleBase基类:
ModuleBase的方案的代价是需要每个layer和model继承,然后多出一个cfg parameter。但是现在暂时感觉ModuleBase的存在用处不大(还需要讨论),所以下面是不用ModuleBase的demo,这个方案的代价只是多出一个cfg parameter。
Beta Was this translation helpful? Give feedback.
All reactions