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

权重迁移 #47

Open
ziwang-com opened this issue May 31, 2023 · 0 comments
Open

权重迁移 #47

ziwang-com opened this issue May 31, 2023 · 0 comments

Comments

@ziwang-com
Copy link
Owner

https://github.com/hassony2/kinetics_i3d_pytorch

从 Tensorflow 转移到 PyTorch 的 I3D 模型
此存储库包含几个脚本,这些脚本允许从论文 Quo Vadis, Action Recognition?Joao Carreira和Andrew Zisserman给PyTorch的新模型和动力学数据集。

原始的(和官方的!)张量流代码可以在这里找到。

转移的核心是剧本i3d_tf_to_pt.py

启动它以生成从 ImageNet 膨胀初始化预训练的 rgb 检查点权重。python i3d_tf_to_pt.py --rgb

要生成流量权重,请使用 。python i3d_tf_to_pt.py --flow

您还可以通过同时使用两个标志在一次运行中生成两者。python i3d_tf_to_pt.py --rgb --flow

请注意,主版本需要 PyTorch 0.3,因为它依赖于此最新版本中包含的最近添加的 ConstantPad3d。

如果您想使用 pytorch 0.2,请查看分支 pytorch-02,其中包含一个简化的模型,所有侧面都有均匀的填充(以及相应的 pytorch 重量检查点)。不同之处在于,在张量流中填充的“SAME”选项允许它不均匀地填充维度的两侧,这种效果在主分支上重现。

这个更简单的模型在演示示例中生成的分数更接近原始张量流模型,并且速度也更快一些。

演示

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant