Anomaly detection using Variational Autoencoder(VAE)のサンプルコードエラーについて
Show older comments
こちらのサンプルコードを動かそうとしています。
最初の画像サイズの部分に関しましては入力画像に応じて変更できるように下記のように書き換えました。
Imgsize = size(readimage(imdsTrain,1)); % 画像サイズ
BlockSize = round(Imgsize(1:2)./10);% ネットワークの入力サイズ
その後実行を続けていくとモデルの学習の部分で下記のようなエラーが返されます。
配列のサイズがこの演算に適合しません。
エラー: deep.internal.recording.operations.MinusBroadcastOp/forward (行 32)
x = x - y;
エラー: - (行 39)
zdata = matlab.lang.internal.move(xdata) - matlab.lang.internal.move(ydata);
エラー: VAEmodel_ver2>ELBOloss (行 188)
squares = 0.5*(xPred-x).^2;
エラー: VAEmodel_ver2>modelGradients (行 165)
loss = ELBOloss(x, xPred, zMean, zLogvar);
エラー: deep.internal.dlfeval (行 18)
[varargout{1:nout}] = fun(x{:});
エラー: dlfeval (行 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
関連ドキュメンテーション
こちらに関する解決方法はありますでしょうか。
宜しくお願い致します。
Accepted Answer
More Answers (0)
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!