How to determine the proper number of hidden layers, and

Hello, everyone

I am doing project whose data has several hundred variables (many of them are categorical)
and the model is binary classification

I am using deep learning with Pytorch

In this case, I want to know

  1. how many hidden layers should I use?

  2. how many nodes should I use for each hidden layer?

Is there any general theory or generally accepted methods to do these? I really want to know.

Thank you in advance and have a nice day!!!