Toby St Clere Smithe <m...@tsmithe.net>
writes:
> Sorry, this isn't sufficient, I just forgot to copy my changed code
> over, so it looked sufficient.. I think the fix will be more involved
> than this!

OK, so this is simple and works, but I don't know if it is
satisfactory. I can't think of a reason why not; in any case, I've
committed it for now.

iff --git a/viennacl/linalg/nmf.hpp b/viennacl/linalg/nmf.hpp
index 02e4007..f77d74b 100644
--- a/viennacl/linalg/nmf.hpp
+++ b/viennacl/linalg/nmf.hpp
@@ -122,6 +122,9 @@ namespace viennacl
       vcl_size_t k = W.size2();
       conf.iters_ = 0;
 
+      W = viennacl::scalar_matrix<ScalarType>(W.size1(), W.size2(), 
(ScalarType) 1.0, ctx);
+      H = viennacl::scalar_matrix<ScalarType>(H.size1(), H.size2(), 
(ScalarType) 1.0, ctx);
+
       viennacl::matrix<ScalarType> wn(V.size1(), k, ctx);
       viennacl::matrix<ScalarType> wd(V.size1(), k, ctx);
       viennacl::matrix<ScalarType> wtmp(V.size1(), V.size2(), ctx);


Ciao,

Toby


-- 
Toby St Clere Smithe
http://tsmithe.net


------------------------------------------------------------------------------
Infragistics Professional
Build stunning WinForms apps today!
Reboot your WinForms applications with our WinForms controls. 
Build a bridge from your legacy apps to the future.
http://pubads.g.doubleclick.net/gampad/clk?id=153845071&iu=/4140/ostg.clktrk
_______________________________________________
ViennaCL-devel mailing list
ViennaCL-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/viennacl-devel

Reply via email to