问题
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