How to create a tensor with shape of Nones?

I want to create tensor of shape=(None, 32, 32, 3)
how can I do so?

Tell what are you trying to do please.

im trying to create an input tensor in pytorch similar to Input(shape=(32,32,3)) in tesorflow

You don’t need to use placeholder variables in PyTorch and can directly pass tensors to the model without specifying their shapes beforehand (similar to what you would be using in numpy).

I need to create a temporary variable (of tensor type) for … K.zeros throws an error saying it cannot create a tensor with shape None

.

You can create an empty tensor via x = torch.tensor([]), but I still don’t understand why you would need to create such a tensor, as placeholders are not used in PyTorch and you can directly use valid tensors instead so could you explain your use case a bit more, please?

Thanks for the information