Image Classification Returning Different Results on Different Computers
조회 수: 2 (최근 30일)
이전 댓글 표시
Hello,
I am running a neural network for image classification using the Matlab deep learning toolbox. The algorithm contains three instances of convolution2dLayer, and it trains using TrainNetwork. If I run the exact same algorithm (identical code) on a different computer, my algorithm returns vastly different results: one computer yields a very high accuracy, around 99%, while the other never learns at all (the learning curve never increases above 50%). The only difference between the two computers is the Matlab version. The 99% accurate computer is on Matlab 2019a (Deep Learning Toolbox, version 12.1), while the 50% accurate computer is on Matlab 2019b (Deep Learning Toolbox, version 13.0). Is it expected that these two versions, which are so close together, would return such different results? I also find it surprising that the older version is better, but as machine learning is a blackbox, perhaps this is entirely possible? Are there any other reasons the results could be so different?
댓글 수: 0
답변 (1개)
Mahesh Taparia
2021년 3월 30일
Hi
This is an unexpected behaviour. Check if all the data preprocessing steps are same, also the training parameters, number of epochs in both the network, weight initialization and other hyperparameters should be same. If the problem still remains, then share your code and relevant information, it will be helpful.
댓글 수: 3
Mahesh Taparia
2021년 4월 1일
Hi
Try with setting the same random seed at the begining of your code using rng command in both the systems, then it won't be much difference. It will generate same random weights. Different weights initialization may take different number of epochs in loss convergence.
참고 항목
카테고리
Help Center 및 File Exchange에서 Image Data Workflows에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!