Hi Karli,
Karl Rupp <[email protected]> writes:
> hmm, on the one hand users want to have the option of providing a
> 'guess' for W and H, but on the other hand they should be warned if
> their guess is bad.
Quite.
> A single matrix-matrix product shouldn't be too bad here, particularly
> as each iteration in nmf() takes several matrix-matrix products.
This is true, but the fewer the better :)
> Similar to the last fix you proposed in the follow-up email, what about
> checking norm_frobenius(W) and norm_frobenius(H) to be positive and to
> reinitialize them with all ones if not? This would fix the generic use case:
> matrix<T> W(N, K);
> matrix<T> H(K, M);
> nmf(A, W, H, conf);
In the end, I did exactly what you've described here :)
Off-topic: I'm also getting compilation errors with the new pipelined
bicgstab. I needed to include viennacl/traits/context.hpp in
viennacl/linalg/bicgstab.hpp, but I also get the following. I don't know
if I've messed something up, or whether something is missing:
In file included from src/_viennacl/iterative_solvers.hpp:4:0,
from src/_viennacl/iterative_solvers.cpp:1:
external/viennacl-dev/viennacl/linalg/bicgstab.hpp: In function
‘viennacl::vector<ScalarType> viennacl::linalg::solve(const MatrixType&, const
viennacl::vector<ScalarType>&, const viennacl::linalg::bicgstab_tag&,
viennacl::linalg::no_precond)’:
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:133:9: error:
‘pipelined_bicgstab_prod’ is not a member of ‘viennacl::linalg’
viennacl::linalg::pipelined_bicgstab_prod(A, p, Ap, r0star,
^
In file included from src/_viennacl/iterative_solvers.hpp:4:0,
from src/_viennacl/iterative_solvers.cpp:1:
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:153:9: error:
‘pipelined_bicgstab_update_s’ is not a member of ‘viennacl::linalg’
viennacl::linalg::pipelined_bicgstab_update_s(s, residual, Ap,
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:160:9: error:
‘pipelined_bicgstab_prod’ is not a member of ‘viennacl::linalg’
viennacl::linalg::pipelined_bicgstab_prod(A, s, As, r0star,
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:167:21: error: ‘accumulate’
is not a member of ‘std’
r_dot_r0 = std::accumulate(host_inner_prod_buffer.begin(),
host_inner_prod_buffer.begin() + buffer_size_per_vector,
ScalarType(0));
^
In file included from src/_viennacl/iterative_solvers.hpp:4:0,
from src/_viennacl/iterative_solvers.cpp:1:
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:168:21: error: ‘accumulate’
is not a member of ‘std’
As_dot_As = std::accumulate(host_inner_prod_buffer.begin() +
buffer_size_per_vector, host_inner_prod_buffer.begin() + 2 *
buffer_size_per_vector, ScalarType(0));
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:169:20: error: ‘accumulate’
is not a member of ‘std’
As_dot_s = std::accumulate(host_inner_prod_buffer.begin() + 2 *
buffer_size_per_vector, host_inner_prod_buffer.begin() + 3 *
buffer_size_per_vector, ScalarType(0));
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:170:21: error: ‘accumulate’
is not a member of ‘std’
Ap_dot_r0 = std::accumulate(host_inner_prod_buffer.begin() + 3 *
buffer_size_per_vector, host_inner_prod_buffer.begin() + 4 *
buffer_size_per_vector, ScalarType(0));
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:171:21: error: ‘accumulate’
is not a member of ‘std’
As_dot_r0 = std::accumulate(host_inner_prod_buffer.begin() + 4 *
buffer_size_per_vector, host_inner_prod_buffer.begin() + 5 *
buffer_size_per_vector, ScalarType(0));
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:172:20: error: ‘accumulate’
is not a member of ‘std’
s_dot_s = std::accumulate(host_inner_prod_buffer.begin() + 5 *
buffer_size_per_vector, host_inner_prod_buffer.begin() + 6 *
buffer_size_per_vector, ScalarType(0));
^
external/viennacl-dev/viennacl/linalg/bicgstab.hpp:186:10: error:
‘pipelined_bicgstab_vector_update’ is not a member of ‘viennacl::linalg’
viennacl::linalg::pipelined_bicgstab_vector_update(result, alpha, p,
omega, s,
^
Cheers,
Toby
--
Toby St Clere Smithe
http://tsmithe.net
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
ViennaCL-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/viennacl-devel