CycleGAN code does not work on MATLAB ver 2022+ but does on 2021a/b.

2 vues (au cours des 30 derniers jours)
Ethan Tu
Ethan Tu le 31 Mar 2023
Commenté : Rishav le 3 Avr 2023
A while back I tried to apply the following the cycleGAN example here: https://www.mathworks.com/help/deeplearning/ug/unsupervised-medical-image-denoising-using-cyclegan.html to another image translation problem.
I changed a few lines/parameters and it ran perfectly fine when I was using Matlab 2021a. However, when I updated to 2022b recently and tried running the exact same code, I run into an error:
Error using images.internal.parserMultissim
Expected input number 1, I, to be finite.
Error in dlarray/multissim (line 90)
[I,Iref,numScales,scaleWeights,sigma,filterSize,C] = images.internal.parserMultissim('I','multissim',2,varargin{:});
Error in test_cycleGAN_train>modelGradients (line 267)
fidelityLossLD = mean(1-multissim(identityImageLD,imageLD),"all");
Error in deep.internal.dlfeval (line 17)
[varargout{1:nargout}] = fun(x{:});
Error in dlfeval (line 40)
[varargout{1:nargout}] = deep.internal.dlfeval(fun,varargin{:});
Error in test_cycleGAN_train (line 136)
dlfeval(@modelGradients,genN2P,genP2N, ...
The modelGradients function is completely the same as in the mathworks example. When using isfinite to check identityImageLD and identityImageHD variables (the input to multisim), it returns all 1s.
I sanity checked and reran the exact code on another laptop with v2021b and it also works fine and I get no error.
Why does v2022b break the code/how to fix it?
  1 commentaire
Rishav
Rishav le 3 Avr 2023
It is difficult to determine the exact cause of the error without more information or access to your code. However, one possibility is that there may be a difference in how the multissim function is implemented or how it handles input arguments between the versions of MATLAB you are using. This could potentially cause the error you are seeing.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Workspace Variables and MAT-Files dans Help Center et File Exchange

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by