-
Notifications
You must be signed in to change notification settings - Fork 1.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
RL4J Malmo Pixels example not working #987
Comments
Finally got Minecraft properly installed. There are two issues, one is one or more arguments used in FFmpegFrameRecorder cause it to error upon starting. org.bytedeco.javacv.FrameRecorder$Exception: avcodec_open2() error -542398533: Could not open video codec. Second is the issue I described earlier in the origial post. Exception in thread "main" java.lang.IllegalArgumentException: Invalid size: cannot get size of dimension 2 for rank 1 NDArray (array shape: [230400]) |
Deeplearning4j version: 1.0.0-beta-7
Issue Description:
Exception in thread "main" java.lang.IllegalArgumentException: Invalid size: cannot get size of dimension 2 for rank 1 NDArray
The observation "MalmoBox" is a rank 1 array of double while QLearningDiscreteConv expects a rank 3 array.
So that was any fix, I created a custom observation class for game pixel data,and passed a rank 3 array in the form of [x * y pixels * channels, 1, 1] - that's the only configuration that work, but then I get an out of bounds error.
Rank: 3, DataType: DOUBLE, Offset: 0, Order: c, Shape: [1200,1,1], Stride: [1,1,1]
Exception in thread "main" java.lang.IndexOutOfBoundsException: 176
at org.bytedeco.javacpp.indexer.Indexer.checkIndex(Indexer.java:94)
at org.bytedeco.javacpp.indexer.UByteRawIndexer.put(UByteRawIndexer.java:95)
at org.bytedeco.javacpp.indexer.UByteRawIndexer.put(UByteRawIndexer.java:119)
at org.bytedeco.javacpp.indexer.UByteIndexer.putDouble(UByteIndexer.java:146)
at org.bytedeco.javacpp.indexer.UByteIndexer.putDouble(UByteIndexer.java:33)
at org.datavec.image.loader.NativeImageLoader.asMat(NativeImageLoader.java:846)
at org.datavec.image.loader.NativeImageLoader.asFrame(NativeImageLoader.java:775)
at org.deeplearning4j.rl4j.observation.transform.legacy.EncodableToImageWritableTransform.transform(EncodableToImageWritableTransform.java:43)
at org.deeplearning4j.rl4j.observation.transform.legacy.EncodableToImageWritableTransform.transform(EncodableToImageWritableTransform.java:37)
at org.deeplearning4j.rl4j.observation.transform.TransformProcess.transform(TransformProcess.java:106)
at org.deeplearning4j.rl4j.util.LegacyMDPWrapper.reset(LegacyMDPWrapper.java:118)
at org.deeplearning4j.rl4j.learning.sync.qlearning.QLearning.refacInitMdp(QLearning.java:158)
at org.deeplearning4j.rl4j.learning.sync.qlearning.QLearning.trainEpoch(QLearning.java:94)
at org.deeplearning4j.rl4j.learning.sync.SyncLearning.train(SyncLearning.java:96)
The text was updated successfully, but these errors were encountered: