keras TimeDistributed

keras TimeDistributed说明及用法
一般的网络输入为4维度(batch,height,width,channels),当有其他维度,时间或者其他,例如mask RCNN的ROI维度,这时就需要使用TimeDistributed。

# ROI Pooling
    # Shape: [batch, num_rois, pool_height, pool_width, channels]
    # Conv layers
    x = KL.TimeDistributed(KL.Conv2D(256, (3, 3), padding="same"),
                           name="mrcnn_mask_conv1")(x)
    x = KL.TimeDistributed(BatchNorm(axis=3),
                           name='mrcnn_mask_bn1')(x)
    x = KL.Activation('relu')(x)



版权声明:本文为qq_43258953原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接和本声明。