Coding style: preprocessing in `forward` method

I am doing deep RL. I want to preprocess observations. Where should I do it? Is it fine if I do it at the very beginning of the forward method of my model?