3
$\begingroup$

I'm new to deep learning. I wanted to know: do we use pre-processing in deep learning? Or it is only used in machine learning. I searched for it and its methods on the internet, but I didn't find a suitable answer.

$\endgroup$
0
1
$\begingroup$

Yes, sure, data pre-processing is also done in deep learning. For example, we often normalize (or scale) the inputs to neural networks. If the inputs are images, we often resize them so that they all have the same dimensions. Of course, the pre-processing step that you apply depends on your data, neural network, and task.

Here or here are two examples of implementations that perform a pre-processing step (normalization in the second case). You can find more explanations and examples here and probably here too.

$\endgroup$
0
$\begingroup$

Adding to nbro's solution, the less you have to normalize/balance/preprocess/augment, the better, e.g. because then you know for sure that the accuracy is the achievement of the model rather than data combing. For example, if you can achieve the same accuracy using two approaches (e.g. with the image dataset):

  1. for each image, subtract global mean, divide by global standard deviation
  2. 1)+random flips, random crops, color jitter, etc,

then 1), if you can achieve a comparable accuracy, is a better solution, as the model is more general. The same refers to the balancing of the data - if you can train a good model without it, it's an additional strength.

$\endgroup$
3
  • $\begingroup$ I wouldn't say that the model is "more general". I would say that the model has learned from a different range of inputs and possibly a more complicated function. So, I'm not really sure about the correctness of this answer, so I would like to read some reliable research paper that goes in the direction of what you're saying. $\endgroup$ – nbro Jan 14 at 22:43
  • $\begingroup$ This can be verified on running the model on the out-of-sample data $\endgroup$ – Alex Jan 15 at 11:12
  • $\begingroup$ Out-of-sample data, of course, can cause problems in both cases (normalization or not). So, would you care to show some code/research that illustrates the issue and really supports your claim? $\endgroup$ – nbro Jan 15 at 11:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.