public static Tensor <T> Allocate <T>(this Context context, T[,,] initValues) { var shape = Shape.GetArrayShape(initValues); var tensor = context.Device.Allocate <T>(shape); var initTensor = initValues.AsTensor(); context.Copy(tensor, initTensor); return(tensor); }