If we have a grayscale network ("Input" -> {1, Automatic, Automatic}
), it can be applied on both gray and color image by:
ColorCombine[net/@ColorSeparate[img]]
But I want to turn this into an end-to-end network and that is easy to deploy.
So it should be adapted to the number of color channels.
We can find some equivalent layers for normal functions.
- ColorSeparate: no such equivalent form
- Map : NetMapOperator, it's a 4-tensor
- ColorCombine : CatenateLayer[1]
So how do I build an external network to adapt to this?