You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Exception in thread "main" ai.djl.translate.TranslateException: ai.djl.engine.EngineException: MXNet engine call failed: MXNetError: Shape inconsistent, Provided = [512,100,8,8], inferred shape=(100,512,8,8)
at ai.djl.inference.Predictor.batchPredict(Predictor.java:189)
at ai.djl.inference.Predictor.predict(Predictor.java:126)
at org.xff.gan.Demo1.main(Demo1.java:92)
Caused by: ai.djl.engine.EngineException: MXNet engine call failed: MXNetError: Shape inconsistent, Provided = [512,100,8,8], inferred shape=(100,512,8,8)
at ai.djl.mxnet.jna.JnaUtils.checkCall(JnaUtils.java:1942)
at ai.djl.mxnet.jna.JnaUtils.imperativeInvoke(JnaUtils.java:521)
at ai.djl.mxnet.jna.FunctionInfo.invoke(FunctionInfo.java:75)
at ai.djl.mxnet.engine.MxNDManager.invoke(MxNDManager.java:345)
at ai.djl.mxnet.engine.MxNDArrayEx.deconvolution(MxNDArrayEx.java:585)
at ai.djl.nn.convolutional.Deconvolution.deconvolution(Deconvolution.java:197)
at ai.djl.nn.convolutional.Deconvolution.forwardInternal(Deconvolution.java:123)
at ai.djl.nn.AbstractBaseBlock.forward(AbstractBaseBlock.java:77)
at ai.djl.nn.Block.forward(Block.java:123)
at org.xff.gan.GeneratorBlock.forwardInternal(GeneratorBlock.java:77)
at ai.djl.nn.AbstractBaseBlock.forward(AbstractBaseBlock.java:77)
at ai.djl.nn.Block.forward(Block.java:123)
at ai.djl.inference.Predictor.predictInternal(Predictor.java:140)
at ai.djl.inference.Predictor.batchPredict(Predictor.java:167)
... 2 more
The location in class GeneratorBlock is
@OverrideprotectedNDListforwardInternal(ParameterStoreparameterStore, NDListndList, booleanb, PairList<String, Object> pairList) {
NDListcurrent = ndList;
current = linear1.forward(parameterStore, current, b);
current = batchNorm1.forward(parameterStore, current, b);
current = relu1.forward(parameterStore,current,b);
current = reshape1.forward(parameterStore, current, b);
current = conv1.forward(parameterStore, current, b);//Exception Therecurrent = batchNorm2.forward(parameterStore, current, b);
current = relu2.forward(parameterStore,current,b);
current = conv2.forward(parameterStore, current, b);
current = batchNorm3.forward(parameterStore, current, b);
current = relu3.forward(parameterStore,current,b);
current = conv3.forward(parameterStore, current, b);
current = batchNorm4.forward(parameterStore, current, b);
current = relu4.forward(parameterStore,current,b);
current = conv4.forward(parameterStore, current, b);
current = tanh1.forward(parameterStore,current,b);
returncurrent;
}
My block at conv1 is (1, 100, 1, 1) -> (1, 512, 8, 8),but why it become Provided = [512,100,8,8], inferred shape=(100,512,8,8)
I debug at that line ,The var current is NDList with only one NDArray is (1, 100, 1, 1),But error at conv1.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
In GAN,My GeneratorBlock class structure like this
But when I use NDArray z to predict the result ,it will throws Exceotion.
The code is
The Exception is
The location in class GeneratorBlock is
and the conv1 is
My block at conv1 is (1, 100, 1, 1) -> (1, 512, 8, 8),but why it become
Provided = [512,100,8,8], inferred shape=(100,512,8,8)
I debug at that line ,The var current is NDList with only one NDArray is (1, 100, 1, 1),But error at conv1.
Beta Was this translation helpful? Give feedback.
All reactions