Skip to content
This repository has been 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 opened this issue May 1, 2019 · 0 comments
Open

Comments

@KocsisV
Copy link

KocsisV commented May 1, 2019

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')
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant