Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The Wrong when I using the \DnCNN\TrainingCodes\DnCNN_TrainingCodes_v1.1\Demo_Train_model_64_25_Res_Bnorm_Adam.m #100

Open
yihaodong1 opened this issue Nov 27, 2023 · 0 comments

Comments

@yihaodong1
Copy link

以下是报错
错误使用 vl_nnconv
FILTERS are larger than the DATA (including padding).
出错 vl_simplenn (第 97 行)
res(i+1).x = vl_nnconv(res(i).x, l.weights{1}, l.weights{2}, ...
出错 DnCNN_train>process_epoch (第 182 行)
res = vl_simplenn(net, inputs, dzdy, res, ...
出错 DnCNN_train (第 111 行)
[net, state] = process_epoch(net, state, imdb, opts, 'train');
出错 Demo_Train_model_64_25_Res_Bnorm_Adam (第 41 行)
[net, info] = DnCNN_train(net, ...

我debug了一下,好像是因为在vl_simplenn.m的第95-117行对层的种类判断的时候没有对bnorm层处理,不知道是我哪里运行错了吗

switch l.type
        case 'conv'
            res(i+1).x = vl_nnconv(res(i).x, l.weights{1}, l.weights{2}, ...
                'pad', l.pad, ...
                'stride', l.stride, ...
                'dilate', l.dilate, ...
                l.opts{:}, ...
                cudnn{:}) ;
            
        case 'concat'
            if size(sigmas,1)~=size(res(i).x,1)
                sigmaMap   = bsxfun(@times,ones(size(res(i).x,1),size(res(i).x,2),1,size(res(i).x,4)),permute(sigmas,[3 4 1 2])) ;
                res(i+1).x = vl_nnconcat({res(i).x,sigmaMap}) ;
            else
                res(i+1).x = vl_nnconcat({res(i).x,sigmas}) ;
            end
            
        case 'SubP'
            res(i+1).x = vl_nnSubP(res(i).x, [],'scale',l.scale) ;
        case 'relu'
            leak = {} ; 
            res(i+1).x = vl_nnrelu(res(i).x,[],leak{:}) ;
    end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant