Coder Social home page Coder Social logo

dcafuse's People

Contributors

mhaghighat avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dcafuse's Issues

LinAlgError: Array must not contain infs or NaNs

Hello , I'm currently working on an AIFR system with tensorflow and I'm trying to incorporate your code in it. I have extracted the feature vectors from 3 layers of my model and want to fuse them using your DCA method. The shape of the vectors comes out as (nxp), (nxq), and (1xn) . So I transposed the vectors to match the specified input shape. The problem is that I keep getting this error and I can't seem to figure it out "LinAlgError: Array must not contain infs or NaNs". I made sure that my inputs have no NULL values so I would really appreciate your input on this. Thanks in advance and sorry for occupying your time :)

Here are the shapes of the vectors I'm using (I'm fusing vector1 with vector 2 in this instance):

vector 1 shape : (25088, 801)
vector 2 shape : (4096, 801)
vector 3 shape : (4096, 801)
Labels shape:  (801,)

And here is the full error:

---------------------------------------------------------------------------
LinAlgError                               Traceback (most recent call last)
c:\python workspace\Senior project\AIFR with VGG\AIFR-VGG.py in <module>
     118 #fused_vector1 = np.add(Xs, Ys)
     119 
----> 120 Xs, Ys, Ax, Ay= dcaFuse(fc1,fc2,y_train1)
     121 fused_vector2 = np.add(Xs, Ys)
     122 

c:\python workspace\Senior project\AIFR with VGG\dcaFuse.py in dcaFuse(***failed resolving arguments***)
   102     """
   103 
--> 104     cx, Wbx = Diag_Bx(PhibX)
   105     cy, Wby = Diag_Bx(PhibY)
   106 

c:\python workspace\Senior project\AIFR with VGG\dcaFuse.py in Diag_Bx(PhibX)
    13 
    14     artSbX = np.dot(PhibX.T, PhibX)
---> 15     eigVals, eigVecs = LA.eig(artSbX)
    16 
    17     # Ignore zero eigenvalues

<__array_function__ internals> in eig(*args, **kwargs)

c:\python workspace\Senior project\AIFR with VGG\AIFR-VGG-env3.8\lib\site-packages\numpy\linalg\linalg.py in eig(a)
  1316     _assert_stacked_2d(a)
  1317     _assert_stacked_square(a)
-> 1318     _assert_finite(a)
  1319     t, result_t = _commonType(a)
  1320 

c:\python workspace\Senior project\AIFR with VGG\AIFR-VGG-env3.8\lib\site-packages\numpy\linalg\linalg.py in _assert_finite(*arrays)
   207     for a in arrays:
   208         if not isfinite(a).all():
--> 209             raise LinAlgError("Array must not contain infs or NaNs")
   210 
   211 def _is_empty_2d(arr):

LinAlgError: Array must not contain infs or NaNs

the code of dcaFuse using tensorflow

Hello? I want to know whether there somebody transforms the code using tensorflow or numpy? I can't do it. But I need the code to finish my master thesis. :(

Can you help me?

Error using svd
Input to SVD must not contain NaN or Inf.

Error in dcaFuse (line 180)
[Wcx,S,Wcy] = svd(Sxy); % Singular Value Decomposition (SVD)

I found the variable is NaN.

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.