在实际项目中出现的该问题,起初以为是cudnn版本的问题,后来才定位到在网络进行reshape操作的时候

input_layer->Reshape({(int)imgin.size(), input_layer->shape(1),
                          input_layer->shape(2), input_layer->shape(3)});

如上所示,第一个参数是输入图片的尺寸,在实际的视频中,输入的图片尺寸有可能为0,那么在reshape操作的时候就会报错。

在外层加一个保护就好了。

相关文章:

  • 2022-12-23
  • 2021-10-30
  • 2021-05-17
  • 2021-06-16
  • 2022-12-23
  • 2021-07-22
  • 2021-06-29
  • 2022-01-01
猜你喜欢
  • 2021-08-10
  • 2021-07-11
  • 2021-10-12
  • 2022-12-23
  • 2021-11-12
  • 2021-12-20
  • 2022-12-23
相关资源
相似解决方案