def count_linear(model,output_size):
    """count FLOPs of linear layer

    :param model: model object
    :param output_size: integer output size of the model
    :returns: FLOPs of linear layer
    """
    input_size=model.rnn.hidden_layer_sizes[-1]
    return input_size*output_size*2