This error is most likely thrown by nn.Dropout2d(), which expects an input of [batch_size, channels, height, width] to zero out entire channels.
If you want to apply the same behavior to your use case, you could unsqueeze a fake spatial dimension, use the dropout layer, and squeeze the activation afterwards.