def network_to_features(network):
    """
    Maps the features of a network (theta, J, input parameters) into a sequence.
    """
    result = list(network.theta)
    result.extend(network.input_parameters)
    result.extend(network.J.flatten())
    return result