PaddleVideo icon indicating copy to clipboard operation
PaddleVideo copied to clipboard

请问当将打架识别模型导出为inference模型时,输入为 shape=[None, cfg.num_seg, 3, cfg.target_size, cfg.target_size],怎么去掉第一个维度呢?

Open muuda opened this issue 1 year ago • 0 comments

我现在正在按着此教程导出inference模型:https://github.com/PaddlePaddle/PaddleVideo/blob/develop/applications/FightRecognition/README.md 但是我现在遇到了一个问题:https://github.com/PaddlePaddle/PaddleVideo/blob/4bee9be28efad952e85179ea3e42fe4b84b54f08/tools/export_model.py#L87 这里的输入维度为五个维度,我想将网络的输入改为[batch_size * cfg.num_seg, 3, cfg.target_size, cfg.target_size]这四个维度。当我简单的去掉第一个维度时,导出inference模型失败。 我查看网络模型源码:https://github.com/PaddlePaddle/PaddleVideo/blob/develop/paddlevideo/modeling/backbones/resnet_tweaks_tsm.py, 发现此网络的输入确实为四个维度,但是为什么导出inference模型时是需要五个维度呢?我想将网络的输入改为四个维度应该怎么做呢? 谢谢解答🙏

muuda avatar May 28 '24 09:05 muuda