Comparison of CNN training results using image datastore and image arrays
2 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
Radians
le 24 Jan 2021
Réponse apportée : Anmol Dhiman
le 2 Fév 2021
Hello,
The question pertains to the following example:
You can see the loss results when the image datastore object is used (as it is in the original example) below with the following function call:
net = trainNetwork(dsTrain,layers,options);
However, if you extract the same datastore (dsTrain) into 4d array of images and split the input and target images into XTrain and YTrain as follows:
dsTrainNoisy_transformed_combined_augmented_temp=readall(dsTrain);
dsTrainNoisy_transformed_combined_augmented=dsTrainNoisy_transformed_combined_augmented_temp(:,1);
dsTrainNoisy_transformed_combined_augmented_2=zeros(32,32,1,9500);
for i=1:9500
dsTrainNoisy_transformed_combined_augmented_2(:,:,:,i)=dsTrainNoisy_transformed_combined_augmented{i,1};
end
dsTrainNoiseless_transformed_combined_augmented_temp=readall(dsTrain);
dsTrainNoiseless_transformed_combined_augmented=dsTrainNoiseless_transformed_combined_augmented_temp(:,2);
dsTrainNoiseless_transformed_combined_augmented_2=zeros(32,32,1,9500);
for i=1:9500
dsTrainNoiseless_transformed_combined_augmented_2(:,:,:,i)=dsTrainNoiseless_transformed_combined_augmented{i,1};
end
XTrain=dsTrainNoisy_transformed_combined_augmented_2;
YTrain=dsTrainNoiseless_transformed_combined_augmented_2;
net = trainNetwork(XTrain,YTrain,layers,options);
The following Loss curve is obtained:
I don't understand why this is the case, since XTrain and YTrain represent the same images as in the data store itself, and nothing else is changed, so why are the results different this time around?
Any help would be highly appreciated.
0 commentaires
Réponse acceptée
Plus de réponses (0)
Voir également
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!