Mask-RCNN training in MATLAB for Instance Segmentation Example Error

3 ビュー (過去 30 日間)
cheng mao hong
cheng mao hong 2021 年 1 月 17 日
コメント済み: 晓朋 孙 2021 年 10 月 13 日
I am trying to run the example file (MaskRCNNTrainingExample.mlx) and I have some errors after two iterations. Please help me to fix the errors below. Thank you.
========================================================================= | Epoch | Iteration | Time Elapsed | Mini-batch | Base Learning | | (hh:mm:ss) | Loss | Rate | ========================================================================= | 1 | 1 | 00:01:51 | 3.2167 | 0.0100 |
| 1 | 2 | 00:04:00 | 1.4978 | 0.0100 |
Error using nnet.internal.cnn.dlnetwork/forward (line 254) Layer 'bn2a_branch2a': Invalid input data. The value of 'Variance' is invalid. Expected input to be positive.
Error in nnet.internal.cnn.dlnetwork/CodegenOptimizationStrategy/propagateWithFallback (line 103) [varargout{1:nargout}] = fcn(net, X, layerIndices, layerOutputIndices);
Error in nnet.internal.cnn.dlnetwork/CodegenOptimizationStrategy/forward (line 52) [varargout{1:nargout}] = propagateWithFallback(strategy, functionSlot, @forward, net, X, layerIndices, layerOutputIndices);
Error in dlnetwork/forward (line 347) [varargout{1:nargout}] = net.EvaluationStrategy.forward(net.PrivateNetwork, x, layerIndices, layerOutputIndices);
Error in networkGradients (line 21) [YRPNRegDeltas, proposal, YRCNNClass, YRCNNReg, YRPNClass, YMask, state] = forward(...
Error in deep.internal.dlfeval (line 18) [varargout{1:nout}] = fun(x{:});
Error in dlfeval (line 41) [varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
  4 件のコメント
Anchit Dhar
Anchit Dhar 2021 年 1 月 27 日
編集済み: Anchit Dhar 2021 年 1 月 27 日
Regarding negative trained variances - this issue has been fixed in the latest update of R2020a and in R2020b. Here is the bug report for this issue.
The issue related to mask-rcnn is being tracked on mask-rcnn's github repo issues section -
https://github.com/matlab-deep-learning/mask-rcnn/issues/2
Massimo Del Guasta
Massimo Del Guasta 2021 年 1 月 27 日
Thanks a lot! Forcing the negative variances to zero, as suggested in the bug report and repeated here below, worked fine for me , using MATLAB r2020b +update 2
idx = dlnet.State.Parameter == "TrainedVariance";
boundAwayFromZero = @(X) max(X, eps('single'));
dlnet.State(idx,:) = dlupdate(boundAwayFromZero, dlnet.State(idx,:));

サインインしてコメントする。

回答 (1 件)

Fatima Zahra
Fatima Zahra 2021 年 4 月 15 日
hi everyone, pls if anyone can help i will be very grateful then below you find the error i got while running a MaskRcnn program knowing i just used my own database that I have to prepare for a first time.
Starting parallel pool (parpool) using the 'local' profile ...
Connected to the parallel pool (number of workers: 6).
Training on GPU.
Training on parallel cluster 'local'.
|=========================================================================|
| Epoch | Iteration | Time Elapsed | Mini-batch | Base Learning |
| | | (hh:mm:ss) | Loss | Rate |
|=========================================================================|
Error using nnet.internal.cnn.dlnetwork/forward (line 254)
Layer 'res5a_branch1': Invalid input data. Out of memory on device. To view more detail about available memory on the GPU, use 'gpuDevice()'. If the problem persists, reset the GPU by calling 'gpuDevice(1)'.
Error in nnet.internal.cnn.dlnetwork/CodegenOptimizationStrategy/propagateWithFallback (line 103)
[varargout{1:nargout}] = fcn(net, X, layerIndices, layerOutputIndices);
Error in nnet.internal.cnn.dlnetwork/CodegenOptimizationStrategy/forward (line 52)
[varargout{1:nargout}] = propagateWithFallback(strategy, functionSlot, @forward, net, X, layerIndices,
layerOutputIndices);
Error in dlnetwork/forward (line 347)
[varargout{1:nargout}] = net.EvaluationStrategy.forward(net.PrivateNetwork, x, layerIndices,
layerOutputIndices);
Error in networkGradients (line 21)
[YRPNRegDeltas, proposal, YRCNNClass, YRCNNReg, YRPNClass, YMask, state] = forward(...
Error in deep.internal.dlfeval (line 18)
[varargout{1:nout}] = fun(x{:});
Error in dlfeval (line 41)
[varargout{1:nout}] = deep.internal.dlfeval(fun,varargin{:});
Error in MASKRCNNPC_Modifier (line 287)
[gradients, loss, state] = dlfeval(@networkGradients, X, gtBox, gtClass, gtMask, dlnet, params);
  1 件のコメント
晓朋 孙
晓朋 孙 2021 年 10 月 13 日
Hello, I have encountered the same problem as you. Have you solved it now? If so, can you tell me how to solve it? Thank you.

サインインしてコメントする。

カテゴリ

Help Center および File ExchangeDeep Learning Toolbox についてさらに検索

製品


リリース

R2020b

Community Treasure Hunt

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

Start Hunting!

Translated by