def Flatten(x):
    """
    (convenience function)
    Flattens out the previous layer. Normally used between Conv2D/MaxPooling2D or LSTM layers
    and Linear/Dense layers
    """
    return x.view(x.shape[0],-1)