summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEdoardo Pasca <edo.paskino@gmail.com>2018-01-23 22:21:18 +0000
committerEdoardo Pasca <edo.paskino@gmail.com>2018-01-23 22:45:21 +0000
commitea2e657b7d91977e2c15e4f4971791c8238cdb0f (patch)
tree1bf3e7550fdfaea28e26f40c512252660e822aaa
parent20ca5ce5a1c23936d0ebf6d49cd80e90e81da7fe (diff)
downloadregularization-ea2e657b7d91977e2c15e4f4971791c8238cdb0f.tar.gz
regularization-ea2e657b7d91977e2c15e4f4971791c8238cdb0f.tar.bz2
regularization-ea2e657b7d91977e2c15e4f4971791c8238cdb0f.tar.xz
regularization-ea2e657b7d91977e2c15e4f4971791c8238cdb0f.zip
added debugging prints
-rw-r--r--Wrappers/Python/fista_module.cpp26
1 files changed, 23 insertions, 3 deletions
diff --git a/Wrappers/Python/fista_module.cpp b/Wrappers/Python/fista_module.cpp
index bb43b84..657500e 100644
--- a/Wrappers/Python/fista_module.cpp
+++ b/Wrappers/Python/fista_module.cpp
@@ -689,8 +689,20 @@ bp::list LLT_model(np::ndarray input, double d_lambda, double d_tau, int iter, d
printf("HO iterations stopped at iteration: %i\n", ll);
result.append<np::ndarray>(npU);
std::cout << "npU shape " << bp::extract<char const *>(bp::str(shape)) <<std::endl;
- std::cout << "npU " << bp::extract<char const *>(bp::str(npU)) <<std::endl;
+ //std::cout << "npU " << bp::extract<char const *>(bp::str(npU)) <<std::endl;
+ std::cout << "npU should be " ;
+ int i = 0 ;
+ while (i < npU.get_nd() ) {
+ std::cout << npU.shape(i++) << " " ;
+ }
+ std::cout << std::endl;
+ i = 0 ;
+ np::ndarray inside = bp::extract<np::ndarray>(result[0]);
+ while (i < inside.get_nd() ) {
+ std::cout << inside.shape(i++) << " " ;
+ }
+ std::cout << std::endl;
}
else if (number_of_dims == 3) {
/*3D case*/
@@ -774,8 +786,16 @@ bp::list LLT_model(np::ndarray input, double d_lambda, double d_tau, int iter, d
std::cout << "Call to LLT_model ended" << std::endl;
std::cout << "result length " << bp::len(result) << std::endl;
//std::cout << "npU shape " << bp::extract<char const *>(bp::str(shape)) <<std::endl;
- std::cout << "npU " << bp::extract<char const *>(bp::str(result[0])) <<std::endl;
-
+ std::cout << "result[0] " << bp::extract<char const *>(bp::str(result[0])) <<std::endl;
+ //std::cout << "result[0] " << result[0].shape(0) << " " << result[0].shape(1) << " " << result[0].shape(2) <<std::endl;
+ std::cout << "result[0] is " ;
+ int i = 0 ;
+ np::ndarray inside = bp::extract<np::ndarray>(result[0]);
+ while (i < inside.get_nd() ) {
+ std::cout << inside.shape(i++) << " " ;
+ }
+
+ std::cout << std::endl;
return result;
}