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

可以给生成的pnnx.py中的pytorch model 增加初始化权重默认入参么,方便迁移到其他地方使用 #5425

Open
hmzjwhmzjw opened this issue Apr 11, 2024 · 0 comments

Comments

@hmzjwhmzjw
Copy link

hmzjwhmzjw commented Apr 11, 2024

detail | 详细描述 | 詳細な説明

class Model(nn.Module):
def init(self, pnnx_bin="pretrained/weights.bin"):
super(Model, self).init()
...
archive = zipfile.ZipFile(pnnx_bin, 'r')
...

@hmzjwhmzjw hmzjwhmzjw changed the title 给生成的pnnx.py中的pytorch model 增加初始化权重默认入参,方便迁移到其他地方使用 可以给生成的pnnx.py中的pytorch model 增加初始化权重默认入参么,方便迁移到其他地方使用 Apr 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants