GithubHelp home page GithubHelp logo

Comments (15)

NerminSalem avatar NerminSalem commented on June 16, 2024

@aravindhm can u help?

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

i tried res_inverse = invert_nn(net, y0, 'imgSize',net.meta.normalization.imageSize,'normalize',get_cnn_normalize(net.meta.normalization),'denormalize',get_cnn_denormalize(net.meta.normalization));
Error using -
Array dimensions must match for binary array op.

Error in invert_nn>nndistance (line 255)
d = x - w ;

Error in invert_nn>nndistance_forward (line 244)
res_.x = nndistance(res.x, ly.w, ly.mask) ;

Error in vl_simplenn (line 374)
res(i+1) = l.forward(l, res(i), res(i+1)) ;

Error in invert_nn (line 116)
res = vl_simplenn(net, x); % x is the random initialized image
but still the same error

from deep-goggle.

aravindhm avatar aravindhm commented on June 16, 2024

I think that y0 is the wrong size. How did you set y0?

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

first thanks alot for your reply
i set y0=res(end-1).x;

from deep-goggle.

aravindhm avatar aravindhm commented on June 16, 2024

Unless res(end-1).x and res(end).x are the same size this will result in a size mismatch error. The network adds a l2 loss comparison at the end of net and uses y0 as the reference for this comparison.

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

i will check the size of the 2 layers but if there are not of the same size, what do u recommend ?

from deep-goggle.

aravindhm avatar aravindhm commented on June 16, 2024

If they are not the same size then truncate the network net.layers = net.layers(1:end-1) before passing it to invert_nn. Please let me know if this works.

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

thanks alot i will try it and send u my feedback

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

i m sorry where to define net.layers = net.layers(1:end-1)?

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

res = vl_simplenn(net, im_) ;
y0=res(end-1).x;
net.layers = net.layers(1:end-1)

net =

layers: {1x41 cell}
  meta: [1x1 struct]

res = invert_nn(net, y0, 'imgSize',net.meta.normalization.imageSize(1:2),'normalize',get_cnn_normalize(net.meta.normalization),'denormalize',get_cnn_denormalize(net.meta.normalization),'numRepeats',1);

i m getting the following errors:
Error using vl_nnconv
The FILTERS depth does not divide the DATA depth.

Error in vl_simplenn (line 300)
res(i+1).x = vl_nnconv(res(i).x, l.weights{1}, l.weights{2}, ...

Error in invert_nn (line 116)
res = vl_simplenn(net, x); % x is the random initialized image

from deep-goggle.

aravindhm avatar aravindhm commented on June 16, 2024

Something seems to have gone wrong with numRepeats == 1. I will need to investigate this. I will have time tomorrow.

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

thanks alot for yr help, i really appreciate it
waiting for yr reply

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

@aravindhm did u had a chance to look for the error?
thanks

from deep-goggle.

aravindhm avatar aravindhm commented on June 16, 2024

I thing the commit should fix it. Use it as

res_inverse = invert_nn(net, y0, ...
'imgSize', net.meta.normalization.imageSize, ...
'normalize', get_cnn_normalize(net.meta.normalization), ...
'denormalize', get_cnn_denormalize(net.meta.normalization));

from deep-goggle.

NerminSalem avatar NerminSalem commented on June 16, 2024

yes it worked, thank you so much, i really appreciate it
thankssssssssssssssssssssss

from deep-goggle.

Related Issues (15)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.