Error in dlfeval for Variational Autoencoders

3 ビュー (過去 30 日間)
Sharif Khalil
Sharif Khalil 2020 年 2 月 1 日
コメント済み: Nick 2020 年 7 月 23 日
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 件のコメント
Nick
Nick 2020 年 7 月 23 日
Have you adjusted the image pre-processor and the layers to match your new data format ?

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDeep Learning for Image Processing についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by