How to apply a pre-trained model of 3 channel images on single channel images?

烂漫一生 提交于 2019-12-08 04:45:00

问题


I tried to used a pre-trained model that already was trained on three-channel color images, however, I am getting an error because of shape difference. Could someone let me know how can I tackle this issue? One user had suggested using Tile layer, but I could not find any relevant document/help for using this layer or any other solution. I really appreciate your help.


回答1:


There is not much information in caffe.proto about tile layer. If you look at the code it just copies data tiles times for each outer dimension. For your case it should be:

layer{
    name: "tile"
    type: "Tile"
    bottom: "bottom-blob"
    top: "top-blob"
    tiling_param {
        // axis is 1 by default
        tiles: 3
    }
}


来源:https://stackoverflow.com/questions/43164970/how-to-apply-a-pre-trained-model-of-3-channel-images-on-single-channel-images

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!