-
Notifications
You must be signed in to change notification settings - Fork 8
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
Problem with vl_nnaxpy? #5
Comments
I also encountered this problem. Have you solved it ? |
@sunzhen6251 |
OK...Thank you anyway... : ) |
This problem occurs when implementing the backward of SE-RestNet-50 in 'Axpy Layer'.
#--------------------------------------------------
dagnn.Layer/backwardAdvanced (line 124)
Invalid derivatives returned by layer "conv5_3".
#--------------------------------------------------
Part of the dagnn.Layer code:
[derInputs, derParams] = obj.backward ... (inputs, {net.params(par).value}, derOutputs) ; if ~iscell(derInputs) || numel(derInputs) ~= numel(in) error('Invalid derivatives returned by layer "%s".', layer.name); end
I checked the 'class' and 'numel' of [derInputs], it looks like the them are 'single' and '1' respectively.
Thus, I run
vl_contrib('test', 'mcnExtraLayers') ;
Same problem appears here,
#---------------------------------------------------------------------------------
Error nnaxpy/basic (line 15)
test.der(@(a) vl_nnaxpy(a, x1, x2), a, dzdy, dzdx{1}, 1e-3*test.range) ;
#---------------------------------------------------------------------------------
'dzdx' is not a 'cell', but a 'single';
Though I try to compel the output of [fun vl_nnaxpy] to be a cell by
y={y}
There is another problem that
#----------------------------------------------------------------------------------
Error nnaxpy/basic (line 16)
test.der(@(x1) vl_nnaxpy(a, x1, x2), x1, dzdy, dzdx{2}, 1e-4*test.range) ;
#----------------------------------------------------------------------------------
It looks like <size(dzdx) = 1>, and dzdx{2} beyond the index.
Could you help me? Thanks!
The text was updated successfully, but these errors were encountered: