Hi,
I think you need to use continous memory, not vector of vectors. For example:
std::vector<double> resallGAF;

long long DIM0 = 1;
long long DIM1 = 4;
long long DIM2 = 32;
long long DIM3 = 32;

double someValue = 0.0;

for (long long i = 0; i < DIM0; ++i)
{
   for (long long j = 0; j < DIM1; ++j)
   { 
      for (long long k = 0; k < DIM2; ++k)
      {
        for (long long m = 0; m < DIM3; ++m)
	{
            resallGAF.push_back(someValue++);
	}
}}}

torch::Tensor result = torch::from_blob(resallGAF.data(), { DIM0, DIM1, DIM2, DIM3 }, torch::kDouble);
std::cout << result << std::endl;

Your solution probably works only on small tensors because ‘from_blob’ does not reach beyond memory segment, however data inside the tensor is garbage.