 
   Tensor<float>* cel_out_tensor = Tensor<float>::CreateTensorGPU(ce_out_dims);
   Tensor<float>* cel_out_tensor_diff = Tensor<float>::CreateTensorGPU(ce_out_dims);
+  Tensor<float>* cel_loss_diff = Tensor<float>::CreateTensorGPU(ce_loss_dims);
 
   Tensor<float>* y_out = Tensor<float>::CreateTensorGPU(out_dims);
 

  cudaFree(out_tensor_diff);
  cudaFree(softmax_out_tensor);
  cudaFree(softmax_out_tensor_diff);
  // cudaFree(cel_out_tensor);
  // cudaFree(cel_out_tensor_diff);  
}



    // calc_out_diff<<<1,1>>>(out_tensor_diff, out_tensor, y_out);
    // calc_out_diff<<<1,1>>>(softmax_out_tensor_diff, softmax_out_tensor, y_out);
    // calc_out_diff<<<1,1>>>(cel_out_tensor_diff, cel_out_tensor, y_out);
    cel_layer.Backward({cel_out_tensor}, {cel_out_tensor}, {soft_max_out_tensor, y_out}, {softmax_out_tensor_diff, cel_loss_diff});
    cudaStatus = cudaGetLastError();
    checkCudaErrors(cudaStatus);

    softmax_layer.Backward({softmaxout_tensor}, {softmax_out_tensor_diff}, {out_tensor}, {out_tensor_diff});
    cudaStatus = cudaGetLastError();
    checkCudaErrors(cudaStatus);

