#include <torch/torch.h>
torch::Tensor rand_tensor1 = torch::rand({ 4,4 });
torch::Tensor rand_tensor2 = torch::rand({ 4,4 });
torch::Tensor y = torch::matmul(rand_tensor1, rand_tensor2);
torch::Tensor A_inv = torch::linalg::inv(rand_tensor1);
torch::Tensor A_inv_b = torch::linalg::solve(rand_tensor1 , rand_tensor2 , true);
torch 学习笔记 1
于 2024-08-21 16:54:10 首次发布