The nn.sequential module simplifies writing models very nicely.  However, when I need to convert from 2D tensors to 1D tensors before the fully connected layers I use view function which cannot be used within the sequential.  I know I can create my own 2d_to_1d module and feed it into sequential but wanted to know if there is a better way to do this. So my question is, what is the best way to change dimensions of a tensor and still use sequential to create a single module that does the whole pipeline?