Why didnt get the same result even when using RNG function?
3 views (last 30 days)
Show older comments
Hello everyone,
I utilized the RNG (Random Number Generator) function to ensure result reproducibility when employing the entire matrix in CNN . However, upon selecting just two columns of the matrix and rerunning the code several times, I did not obtain the same result consistently. With the entire matrix, I consistently achieved the same result. Ps: I am using parallel environment.
rng(0);
appp=mfcc_matrix_app;
testt=mfcc_matrix_test;
% CNN code
%always get the same result
However, when I select just two columns and rerun the code several times, I didn't get the same result.
rng(1);
t=[1,2];
for j =1:length(t)
appp = mfcc_matrix_app(:, t(1:end)) ;
testt = mfcc_matrix_test(:, t(1:end)) ;
% CNN code
%didnt get the same accuracy
end
would anyone help me please! thanks in advance.
0 Comments
Answers (1)
Steven Lord
on 16 Nov 2023
Suppose you stack a deck of cards in a particular way. You then play a hand of standard five-card draw poker with 3 players. You deal out 5 cards to each player, meaning that the first card to be dealt during the draw phase is the 16th in the deck.
Then you stack the deck the exact same way to play the next hand, but one of the players steps away from the table to take a phone call. You deal out 5 cards to each player, meaning that the first card to be dealt during the draw phase is the 11th in the deck.
The results of the two hands won't be identical even though the deck was in the same state before each hand.
What guarantee do you have that the CNN code generates the exact same quantity of random numbers in each case, if the number of random numbers it requires is based on how much data you have?
See Also
Categories
Find more on Deep Learning Toolbox in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!