x0 = Input((10,10,64))
x = Reshape((10,10,2,32), input_shape = (10,10,64))(x0)
交換位置拿到上下兩層
x = Permute((1,2,4,3))(x)
x1 = Lambda(lambda z: K.expand_dims(z[:, :, :, :, 0], axis=-1))(x)
x2 = Lambda(lambda z: K.expand_dims(z[:, :, :, :, 1], axis=-1))(x)
上下分好層
x1 = Conv3D(2, kernel_size=(3, 3, 2), strides=(1, 1, 2), padding='same')(x1)
x2 = Conv3D(2, kernel_size=(3, 3, 2), strides=(1, 1, 2), padding='same')(x2)
對(duì)每一個(gè)info進(jìn)行卷積,相當(dāng)于group,進(jìn)行Primary group convolution操作
x1 = Reshape((10,10,32), input_shape=(10, 10, 16, 2))(x1)
x2 = Reshape((10,10,32), input_shape=(10, 10, 16, 2))(x2)
分別卷積
x = concatenate([x1, x2],axis = -1)
卷積完 懟在一起
x = Reshape((10,10,2,32), input_shape = (10,10,64))(x)
x = Permute((1,2,4,3))(x)
進(jìn)行 Secondary group convolution 操作
x = Conv3D(2, kernel_size=(3, 3, 1), strides=(1, 1, 1), padding='same')(x)
x = Reshape((10,10,64), input_shape = (10, 10, 32, 2))(x)
手工
visi = Model(x0, x)