       theta.setZero();
       gradient.setZero();
 
-      Vector<T> bottom_theta;
       Matrix<T> xin_trans = xin.transpose();
       Vector<T> temp(xin.rows());
 

      CUDA_CALL(cudaMalloc(&d_sum, sizeof(T)));
      CUDA_CALL(cudaMemset(d_end, 0, sizeof(T)));

      T * d_bottom_theta;

      T * d_gradient;

      dim3 dimBlock(BLOCK_SIZE);

template <typename T>
__global__ void calculateTheta(T *d_gradient, T *d_theta, T factor, int theta_size){
  int col = blockIdx.x * blockDim.x + threadIdx.x;
  if (col < theta_size){
    d_theta[col] = d_theta[col] - (factor * d_gradient[col]);
  }
