InternVideo icon indicating copy to clipboard operation
InternVideo copied to clipboard

load_state_dict: _IncompatibleKeys(missing_keys=[], unexpected_keys=['temp', 'itm_head.weight', 'itm_head.bias'])

Open lexilii opened this issue 1 year ago • 3 comments

运行 InternVideo2_stage2_1B 的 demo.ipynb 时,intern_model, tokenizer = setup_internvideo2(config) 会报如下警告: load_state_dict: _IncompatibleKeys(missing_keys=[], unexpected_keys=['temp', 'itm_head.weight', 'itm_head.bias'])

最终能够得到如下运行结果: text: A man in a gray sweater plays fetch with his dog in the snowy yard, throwing a toy and watching it run. ~ prob: 0.7927 text: A playful dog and its owner wrestle in the snowy yard, chasing each other with joyous abandon. ~ prob: 0.1769 text: A pet dog excitedly runs through the snowy yard, chasing a toy thrown by its owner. ~ prob: 0.0291 text: A man in a gray hat and coat walks through the snowy yard, carefully navigating around the trees. ~ prob: 0.0006 text: A person dressed in a blue jacket shovels the snow-covered pavement outside their house. ~ prob: 0.0003 text: A person stands on the snowy floor, pushing a sled loaded with blankets, preparing for a fun-filled ride. ~ prob: 0.0002 text: A playful dog slides down a snowy hill, wagging its tail with delight. ~ prob: 0.0001 text: A person in a blue jacket walks their pet on a leash, enjoying a peaceful winter walk among the trees. ~ prob: 0.0001 text: A man in a gray coat walks through the snowy landscape, pulling a sleigh loaded with toys. ~ prob: 0.0000 text: A person bundled up in a blanket walks through the snowy landscape, enjoying the serene winter scenery. ~ prob: 0.0000

请问是否模型加载有什么问题?

lexilii avatar Sep 05 '24 07:09 lexilii

这个警告是没有问题的,这几个权重只在训练时使用

leexinhao avatar Sep 16 '24 14:09 leexinhao

运行 InternVideo2_stage2_1B 的 demo.ipynb 时,intern_model, tokenizer = setup_internvideo2(config) 会报如下警告: load_state_dict: _IncompatibleKeys(missing_keys=[], unexpected_keys=['temp', 'itm_head.weight', 'itm_head.bias'])

最终能够得到如下运行结果: text: A man in a gray sweater plays fetch with his dog in the snowy yard, throwing a toy and watching it run. ~ prob: 0.7927 text: A playful dog and its owner wrestle in the snowy yard, chasing each other with joyous abandon. ~ prob: 0.1769 text: A pet dog excitedly runs through the snowy yard, chasing a toy thrown by its owner. ~ prob: 0.0291 text: A man in a gray hat and coat walks through the snowy yard, carefully navigating around the trees. ~ prob: 0.0006 text: A person dressed in a blue jacket shovels the snow-covered pavement outside their house. ~ prob: 0.0003 text: A person stands on the snowy floor, pushing a sled loaded with blankets, preparing for a fun-filled ride. ~ prob: 0.0002 text: A playful dog slides down a snowy hill, wagging its tail with delight. ~ prob: 0.0001 text: A person in a blue jacket walks their pet on a leash, enjoying a peaceful winter walk among the trees. ~ prob: 0.0001 text: A man in a gray coat walks through the snowy landscape, pulling a sleigh loaded with toys. ~ prob: 0.0000 text: A person bundled up in a blanket walks through the snowy landscape, enjoying the serene winter scenery. ~ prob: 0.0000

请问是否模型加载有什么问题?

你好,这个排序结果应该是有点不对的,我的结果和你一摸一样,但是正确的结果应该是这么多。请问你解决过这个问题了吗?

Volibear1234 avatar Nov 19 '24 02:11 Volibear1234

运行 InternVideo2_stage2_1B 的 demo.ipynb 时,intern_model, tokenizer = setup_internvideo2(config) 会报如下警告: load_state_dict: _IncompatibleKeys(missing_keys=[], unexpected_keys=['temp', 'itm_head.weight', 'itm_head.bias']) 最终能够得到如下运行结果: text: A man in a gray sweater plays fetch with his dog in the snowy yard, throwing a toy and watching it run. ~ prob: 0.7927 text: A playful dog and its owner wrestle in the snowy yard, chasing each other with joyous abandon. ~ prob: 0.1769 text: A pet dog excitedly runs through the snowy yard, chasing a toy thrown by its owner. ~ prob: 0.0291 text: A man in a gray hat and coat walks through the snowy yard, carefully navigating around the trees. ~ prob: 0.0006 text: A person dressed in a blue jacket shovels the snow-covered pavement outside their house. ~ prob: 0.0003 text: A person stands on the snowy floor, pushing a sled loaded with blankets, preparing for a fun-filled ride. ~ prob: 0.0002 text: A playful dog slides down a snowy hill, wagging its tail with delight. ~ prob: 0.0001 text: A person in a blue jacket walks their pet on a leash, enjoying a peaceful winter walk among the trees. ~ prob: 0.0001 text: A man in a gray coat walks through the snowy landscape, pulling a sleigh loaded with toys. ~ prob: 0.0000 text: A person bundled up in a blanket walks through the snowy landscape, enjoying the serene winter scenery. ~ prob: 0.0000 请问是否模型加载有什么问题?

你好,这个排序结果应该是有点不对的,我的结果和你一摸一样,但是正确的结果应该是这么多。请问你解决过这个问题了吗?

我也跟你俩一样,还有我几个合作者也都是,set 完seed勉强能猜对,但迁移到私人数据集上效果就比瞎猜好一点,估计我太菜不会debug,或者就是代码或者权重有问题。

formanuscriptsharing avatar Sep 14 '25 05:09 formanuscriptsharing