 }
 
 
-void print_coeffs(const float_type* lcoeff_host, const float_type* ucoeff_host, const int output_size_x, const int output_size_y, const int output_size_z, const int input_size_x, const int input_size_y, const int input_size_z, const int length_x, const int length_y, const int shift_x, const int shift_y, const int offset_x, const int offset_y)
-{
+void print_coeffs(const float_type* lcoeff_host, const float_type* ucoeff_host, int* sizes, int* dims, float_type* lcoeff_host_sparse, float_type* ucoeff_host_sparse, const int output_size_x, const int output_size_y, const int output_size_z, const int input_size_x, const int input_size_y, const int input_size_z, const int length_x, const int length_y, const int shift_x, const int shift_y, const int offset_x, const int offset_y)
+{
+    int* dim_p = dims;
+    float_type* lcoeff_p = lcoeff_host_sparse;
+    float_type* ucoeff_p = ucoeff_host_sparse;
+
+    int size_counter = 0;
+
     for(int out_x = 0; out_x < output_size_x; out_x++)
     {
         for(int out_y = 0; out_y < output_size_y; out_y++)

__constant__ const float_type ulp =          2.220446049250313080848e-16;
#endif


#define gpuErrchk(ans) { gpuAssert((ans), __FILE__, __LINE__); }
inline void gpuAssert(cudaError_t code, const char* file, int line, bool abort = true)

        cudaMemcpy(lcoeff_host, coeffs, num_out_neurons_0_layer*length_x*length_y*fp->layers[0]->input_size[2]*sizeof(float_type), cudaMemcpyDeviceToHost);
        cudaMemcpy(ucoeff_host, coeffs, num_out_neurons_0_layer*length_x*length_y*fp->layers[0]->input_size[2]*sizeof(float_type), cudaMemcpyDeviceToHost);

        lcst_host = (float_type*) malloc(num_out_neurons_0_layer*sizeof(float_type));
        ucst_host = (float_type*) malloc(num_out_neurons_0_layer*sizeof(float_type));

        cudaMemcpy(lcst_host, csts, num_out_neurons_0_layer*sizeof(float_type), cudaMemcpyDeviceToHost);
        cudaMemcpy(ucst_host, csts, num_out_neurons_0_layer*sizeof(float_type), cudaMemcpyDeviceToHost);
