4,441 questions
2 votes
1 answer
125 views
PCA with arpack returns different values when the order of observations change, but why?
I have recently noticed that when I change the order of the observations in a sparse array, scikit-learn PCA with svd_solver="arpack" returns different floating point numbers. Is this an ...
1 vote
2 answers
96 views
Confused about how tf.keras.Sequential works in TensorFlow – especially activation and input_shape
I'm learning TensorFlow to build machine learning models in Python. I tried following the official documentation on creating a simple classification model, but I couldn't clearly understand the tf....
0 votes
0 answers
52 views
MICCG(0) for a fluid simulation fails at Neumann boundaries
I am trying to follow Robert Bridson's Fluid Simulation Notes (https://www.cs.ubc.ca/~rbridson/fluidsimulation/fluids_notes.pdf) to implement my own eulerian fluid simulator for the first time. I was ...
0 votes
1 answer
126 views
It is possible to compute both the size and values for a std array in a constexpr function?
I am trying to express the structure of a sparse matrix (and the structure resulting from sparse matrix operations) at compile time with template parameters and constexpr functions. I've defined this ...
2 votes
0 answers
191 views
How to reuse cuDSS factors when solving a system of linear equations Ax=b
I am using cuDSS to solve a set of Ax=b equations as follows cudssMatrixType_t mtype = CUDSS_MTYPE_SPD; cudssMatrixViewType_t mview = CUDSS_MVIEW_UPPER; cudssIndexBase_t base = CUDSS_BASE_ZERO; ...
2 votes
1 answer
112 views
How to convert Eigen Sparse Matrix to Cuda CuSparse Matrix
I am trying to convert an Eigen Sparse Matrix of size NxN to CuSparse matrix so that I can use CUDA to solver the matrix Ax=B. Came across this thread which is pretty old (Convert Eigen::SparseMatrix ...
1 vote
1 answer
54 views
How to produce tensor of first occurrencies of another tensor using PyTorch
Let's say we have an ordered 1D tensor of ints/longs t. I want to produce a new tensor a with size max(t) where each term a[i] contains the first occurrence of the value i in the tensor t. We could ...
0 votes
1 answer
67 views
Matrix free arnoldi
I want to do a "matrix-free eigenvalue evaluation" of a unitary matrix using ARPACK package. Unitary matrix comes from a sparse hermitian matrix, something that happens in many-body problem. ...