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
{{ message }}
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.
}
`
When running it the EasyTrain.fit function gives following error:
Exception in thread "main" ai.djl.engine.EngineException: MXNet engine call failed: MXNetError: Check failed: src.Size() == dst->Size() (1 vs. 10) : Cannot reshape array of size 1 into shape [1,10]
Stack trace:
File "C:\source\mxnet\src\operator\numpy\np_matrix_op.cc", line 144
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:382)
at ai.djl.mxnet.engine.MxNDManager.invoke(MxNDManager.java:400)
at ai.djl.mxnet.engine.MxNDArray.reshape(MxNDArray.java:1160)
at ai.djl.training.loss.L2Loss.evaluate(L2Loss.java:56)
at ai.djl.training.EasyTrain.trainSplit(EasyTrain.java:124)
at ai.djl.training.EasyTrain.trainBatch(EasyTrain.java:110)
at ai.djl.training.EasyTrain.fit(EasyTrain.java:58)
at Train.main(Train.java:77)
The dataset at least seemed to be set up correctly.
I tried reducing the batch size, but dst.size is allways 10 times src.size
My dataset are multiple 28*28 jpg images
Another les important problem I have is, that I am not able to get Mxnet to work with an Cuda 121 GPU
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
-
I am getting an Error when trying to train Deep Java Library neural Network with an Image folder Dataset
0
With this code:
`import ai.djl.Application;
import ai.djl.MalformedModelException;
import ai.djl.Model;
import ai.djl.basicdataset.cv.classification.ImageFolder;
import ai.djl.basicdataset.cv.classification.Mnist;
import ai.djl.basicmodelzoo.basic.Mlp;
import ai.djl.modality.cv.Image;
import ai.djl.modality.cv.transform.Resize;
import ai.djl.modality.cv.transform.ToTensor;
import ai.djl.ndarray.types.Shape;
import ai.djl.nn.Activation;
import ai.djl.nn.Blocks;
import ai.djl.nn.SequentialBlock;
import ai.djl.nn.core.Linear;
import ai.djl.repository.Repository;
import ai.djl.training.DefaultTrainingConfig;
import ai.djl.training.EasyTrain;
import ai.djl.training.Trainer;
import ai.djl.training.TrainingConfig;
import ai.djl.training.dataset.RandomAccessDataset;
import ai.djl.training.evaluator.Accuracy;
import ai.djl.training.listener.TrainingListener;
import ai.djl.training.loss.Loss;
import ai.djl.training.optimizer.Optimizer;
import ai.djl.training.util.ProgressBar;
import ai.djl.translate.TranslateException;
import java.io.IOException;
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
public class Train {
public static void main(String[] args) throws IOException, TranslateException {
}
`
When running it the EasyTrain.fit function gives following error:
The dataset at least seemed to be set up correctly.
I tried reducing the batch size, but dst.size is allways 10 times src.size
My dataset are multiple 28*28 jpg images
Another les important problem I have is, that I am not able to get Mxnet to work with an Cuda 121 GPU
Beta Was this translation helpful? Give feedback.
All reactions