   floatType_t *d_theta1;
   CUDA_CALL( cudaMalloc( &d_theta1, 
           sizeof(floatType_t) * theta1Rows * theta1Cols ) );
+
+  floatType_t *d_theta2;
+  CUDA_CALL( cudaMalloc( &d_theta2, 
+          sizeof(floatType_t) * theta2Rows * theta2Cols ) );
+
+  float alpha = 1.0;
+  float beta  = 0.0;
 
 #if 1
   if( sizeof( floatType_t ) == 4 ) 

  for( int i = 0; i < theta2Cols*theta2Rows; i++ )
    theta2Grad[i] *= recip;
#endif
} /* end costFunction */

void predict(floatType_t       *X, 

                              Xexamples, theta1Rows, theta1Cols,
			      &alpha, d_X, Xfeatures,
                              d_theta1, theta1Rows, &beta,
                              &d_z2[INDX(0,1,Xexamples)], Xexamples ) );                              
    CUDA_CALL( cudaMemcpy( z2, d_z2, 
                           sizeof(floatType_t)*Xexamples*(theta1Rows+1),
                           cudaMemcpyDeviceToHost ) );
    
