How to create None dimmension in Pytorch

I wanted to create a None dimension in a Pytorch tensor just like we do in Keras something like (None,224,224,3). Is it possible in Pytorch?

I don’t think it’s possible to add this “symbolic” None dimension to a PyTorch tensor (at least not in the standard eager tensors), as it wouldn’t be needed. If I’m not mistaken, Keras (and/or TF) uses it to specify a dimension with a variable size. If so, you can just use a different (batch) size in plain PyTorch tensors.