I have several images as input. I know I can use 3D convolutional layers, but I don't want to do it. Instead I want to find the patterns in the 2 dimentions of images.
I mean each image should be passed through SeparableConv2D, like that:
# this code raises an error ValueError: Input 0 of layer <name> is
# incompatible with the layer: expected ndim=4, found ndim=5.
model = Sequential([
Input(shape=(16, 128, 128, 1)),
SeparableConv2D(32, 3),
GlobalAvgPool3D(),
])
I know, I can use here Conv3D as Conv2D:
model = Sequential([
Input(shape=(16, 128, 128, 1)),
Conv3D(32, [1, 3, 3]),
GlobalAvgPool3D(),
])
But I need exactly SeparableConv2D.
Maybe I can do it through the custom layer or something else? I just can't even imagine a solution.
P.S. Each input contains several images.