mhaghighat / dcafuse Goto Github PK
View Code? Open in Web Editor NEWFeature fusion using Discriminant Correlation Analysis (DCA)
License: BSD 2-Clause "Simplified" License
Feature fusion using Discriminant Correlation Analysis (DCA)
License: BSD 2-Clause "Simplified" License
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. :(
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.
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
My research direction is behavior recognition. Your work has greatly helped me.Thank you.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.