#include "utils.h" #include #include #include void save_tensor_to_file(const torch::Tensor& tensor, const std::string& file_path) { try { std::cout << "[DEBUG] Entering save_tensor_to_file for: " << file_path << ", tensor shape: " << tensor.sizes() << std::endl; torch::save(tensor, file_path); std::cout << "Saved tensor to: " << file_path << std::endl; } catch (const c10::Error& e) { std::cerr << "Error saving tensor to " << file_path << ": " << e.what() << std::endl; } }