[Relay][Frontend] Can relay take None include shape?

Hi

I’m trying to optimizing pretrained mtcnn keras model.

But shape of each model like (None, None, 3), so i cannot specifiy input image

Is there way to run relay in this None include shape model?

Thanks in advance!

I have the same problem

You can replace None with relay.Any() in the shape dict if you need dynamic shape.

1 Like

it doesn’t work , “Check failed: pval != nullptr == false: Cannot allocate memory symbolic tensor shape [?, ?]”

If you are compiling dynamic models, you need to use relay.vm.compile rather than graph runtime.

1 Like

it work well, thank you, dalao :smiley: