I am using a BatchNormalization 1d in my code and shows me this error.
def __init__(self, x_dim, h_dim1, h_dim2,h_dim3,z_dim):
    super(VAE, self).__init__()
    self.x_dim = x_dim
    
    # encoder part
    self.fc1 = nn.Linear(x_dim, h_dim1)
    self.fc2 = nn.Linear(h_dim1, h_dim2)
    self.fc3 = nn.Linear(h_dim2,h_dim3)
    self.fc31 = nn.Linear(h_dim3, z_dim)
    self.fc32 = nn.Linear(h_dim3, z_dim)
    self.dropout = nn.Dropout(0.5)
    
    self.Encoder = nn.Sequential(
        self.fc1,
        nn.Dropout(0.5),
        nn.ReLU(),
        nn.BatchNorm1d(h_dim1),
        self.fc2,
        nn.Dropout(0.5),
        #nn.Dropout(0.1),
        nn.ReLU(),
        nn.BatchNorm1d(h_dim2),
        self.fc3,
        nn.Dropout(0.5),
        nn.ReLU(),
        nn.BatchNorm1d(h_dim3)
    )