1. 程式人生 > >MXnet報錯處理——input image size smaller than input shape

MXnet報錯處理——input image size smaller than input shape

跑inception V3模型時,出現報錯

報錯:

terminate called after throwing an instance of 'dmlc::Error'

  what():  [10:06:15] src/io/image_aug_default.cc:282: Check failed: static_cast<index_t>(res.rows) >= param_.data_shape[1] && static_cast<index_t>(res.cols) >= param_.data_shape[2] input image size smaller than input shape

原因:

image_aug_default說明是資料增強導致輸入影象的size小於模型的input shape,

解決:

註釋

#data.set_data_aug_level(parser, 3)
#min_random_scale = 0.533

inception v3的輸入影象為299*299,因此增加min_random_scale的值:

min_random_scale = 0.623