Skip to content
This repository was archived by the owner on Jul 1, 2024. It is now read-only.
This repository was archived by the owner on Jul 1, 2024. It is now read-only.

Different layer input/output shapes between tensorflow and mxnet backend #231

Open
@KocsisV

Description

@KocsisV

Hello!

I'm trying to use keras with mxnet backend (mxnet-cu90mkl==1.3.1), but I ran into an issue. It seems that some layers have different input/output shapes between tensorflow and mxnet.
I'm trying to use segmentation_models repository, which runs fine if I use the tensorflow backend.
With mxnet backend I receive the following exception:
mxnet.base.MXNetError: Error in operator conv0/conv2d1: [14:52:45] src/operator/nn/convolution.cc:193: Check failed: dilated_ksize_y <= AddPad(dshape[2], param_.pad[0]) (7 vs. 6) kernel size exceed input

To reproduce the issue install segmentation_models ( pip3 install segmentation_models ), warning it will install the standard keras package too, reinstall keras-mxnet.
Then run the following python code:

from segmentation_models import *
model = Unet( 'resnet34', encoder_weights='imagenet')

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions