I have a list of tensors in this form:

[tensor(-2.9222, grad_fn=), tensor(-2.8192, grad_fn=SqueezeBackward1>), tensor(-3.1894, grad_fn=), tensor(-2.9048, grad_fn=)]

and what I need is this list to be in the form of a tensor like this:

tensor([-0.5575, -0.9004, -0.8491, …, -0.7345, -0.6729, -0.7553],grad_fn=SqueezeBackward1>)

Is it possible to do such a conversion and keep the grad_fn set as it is per tensor in the original image?