Category : adam

I am using libtorch to implement some optimize code in c++; For some reason, I need to create a tensor that its value is between(-0.5,0.5) as a jitter for another tensor. So I implement that in this way: I have two tensor(shape{8,3)} called vtxp_tensor and vtxc_tensor: torch::Tensor vtxp_tensor = torch::from_blob(vtxp_data.data(), {8,3} torch::TensorOptions.dtype(torch::kFloat32)).requires_grad_(true); torch::Tensor vtxc_tensor = ..

Read more