Hi Ptrblck,
I want to create a 3 dimensional Gaussian with defined size and standard deviation. My code in Matlab is :
 % Gaussian3D Creates 3-D Gaussian Kernel of specified
 % width sigma_array=[sigma_x, sigma_y, sigma_z] with
 % profile length of size_array=[size_x, size_y, size_z]
 a1=t1;
 b1=t2;
 c1=t3;
 if(all([sigma_array ])>0 & length(size_array) == length(sigma_array))
  % Make 1D Gaussian kernel
  % Filter each dimension with the 1D Gaussian kernels\
  sigma_x=sigma_array(1);
  size_x=size_array(1);
  sigma_y=sigma_array(2);
  size_y=size_array(2);
  sigma_z=sigma_array(3);
  size_z=size_array(3);

   Kx = fspecial('gaussian', [1 round(size_x)], sigma_x);
   Ky = fspecial('gaussian', [1 round(size_y)], sigma_y);
  Kz = fspecial('gaussian', [1 round(size_z)], sigma_z);
  % since gaussian Kernel is separable
  G=convn(Hz,convn(Hx,Hy));
 end
end```

Would you please tell me what is the equivalent of Convn and the fspecial in pytorch?