Effacer les filtres
Effacer les filtres

Error in dlfeval for Variational Autoencoders

2 vues (au cours des 30 derniers jours)
Sharif Khalil
Sharif Khalil le 1 Fév 2020
Commenté : Nick le 23 Juil 2020
I am trying to implement the VAE on my data. I found the following link:
In this example the number of training images from the MNIST dataset is 60,000 images for training and 10,000 images for testing, the imageSize = [28 28 1];
My dataset is 8522 images for training, and 2135 images for testing, the imageSize = [227 227 3];
My 1st question is, does this code work only for gray scale images? if yes, is there a way to use VAE for RGB images?
2nd question is: How can I solve this error from implementing [infGrad, genGrad] = dlfeval(@modelGradients, encoderNet, decoderNet, XBatch); do I need to change the encoderNet, or decoderNet for my data?
error description:
Error using -
Matrix dimensions must agree.
Error in deep.internal.recording.operations.MinusBroadcastOp/forward (line 32)
x = x - y;
Error in - (line 39)
xdata = xdata - ydata;
Error in ELBOloss (line 2)
squares = 0.5*(xPred-x).^2;
Error in modelGradients (line 4)
loss = ELBOloss(x, xPred, zMean, zLogvar);
Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});
Error in dlfeval (line 40)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
Error in Test_VAE_mydata (line 67)
[infGrad, genGrad] = dlfeval(...
  1 commentaire
Nick
Nick le 23 Juil 2020
Have you adjusted the image pre-processor and the layers to match your new data format ?

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Deep Learning for Image Processing dans Help Center et File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by